Skip to content

Commit

Permalink
fix(oci): simplify terms and add more references
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdcordeiro committed Apr 15, 2024
1 parent 9405b18 commit f264461
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
11 changes: 6 additions & 5 deletions oci/oci-explanation/ubuntu-oci-container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ images that can be reliably installed across a variety of compliant host environ
Ubuntu’s `LTS Docker Image Portfolio <https://ubuntu.com/security/docker-images>`_
provides OCI-compliant images that receive stable security updates and predictable
software updates, thus ensuring consistency in both maintenance schedule and operational
interfaces for the underlying software your software builds on.
interfaces for the underlying foundation your software builds on.

Moreover, `Ubuntu-based containers <https://ubuntu.com/containers>`_ (like
chiselled container images) all leverage the Ubuntu container image as their
starting point, and thus also profit from its support and security commitments.
`chiselled container images <https://canonical-rockcraft.readthedocs-hosted.com/en/latest/explanation/chisel/>`_)
all leverage the Ubuntu container image as their
starting point, and so also benefit from its
`support and security commitments <https://ubuntu.com/security/docker-images>`_.

The Ubuntu container image is built from a minimal rootfs tarball. This tarball
is similar to `Ubuntu Base <https://wiki.ubuntu.com/Base>`_
but it already contains the modifications needed to make the rootfs suitable for
already contains the modifications needed to make the rootfs suitable for
building OCI/Docker container images. The Ubuntu OCI rootfs tarballs are published
in `OCI partner images <https://partner-images.canonical.com/oci/>`_.
20 changes: 10 additions & 10 deletions oci/oci-how-to/create-chiselled-ubuntu-image.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Create a chiselled Ubuntu base image for C/C++, Go and Rust applications
************************************************************************
Create a chiselled Ubuntu image for C/C++, Go and Rust applications
*******************************************************************

This guide will provide step-by-step instructions on how to create your own chiselled Ubuntu container image to run a compiled application.

Expand All @@ -8,12 +8,12 @@ This guide will provide step-by-step instructions on how to create your own chis
- Chisel provides a developer-friendly CLI to install slices of packages from the upstream Ubuntu distribution onto the container filesystem.


Build the chiselled Ubuntu base image
-------------------------------------
Build the chiselled Ubuntu image
--------------------------------

This image must contain all the essential slices that are required for the execution of common compiled applications. As a base, the must-have list of slices is:

- **base-files_base** and **base-files_release-info**: will give you the overall base structure of the container image's filesystem, together with the underlying Ubuntu base's release information,
- **base-files_base** and **base-files_release-info**: will give you the overall base structure of the container image's filesystem, together with the underlying Ubuntu release information,
- **ca-certificates_data**: for cryptographic certificate verifications,
- **libgcc-s1_libs** and **libc6_libs**: for the libgcc-s1 and libc6 libraries.

Expand Down Expand Up @@ -56,18 +56,18 @@ Start by creating a Dockerfile with the following content:
FROM scratch
COPY --from=builder /rootfs /
Build the chiselled Ubuntu base image by running:
Build the chiselled Ubuntu image by running:

.. code-block:: bash
docker build -t chiselled-ubuntu-base:latest . --build-arg ARCH=<your_arch> # example ARCH=amd64
docker build -t chiselled-ubuntu:latest . --build-arg ARCH=<your_arch> # example ARCH=amd64
You'll then find yourself with a new container image with approximately 5MB (or 2.5MB when compressed).

Build the application image
---------------------------

Now that you have the ``chiselled-ubuntu-base:latest`` image, you can simply add your compiled application to the image and run it from there. For the sake of simplicity, this guide will give your three very simple “Hello World” application examples for C, Go and Rust.
Now that you have the ``chiselled-ubuntu:latest`` image, you can simply add your compiled application to the image and run it from there. For the sake of simplicity, this guide will give you three very simple “Hello World” application examples for C, Go and Rust.


.. tabs::
Expand Down Expand Up @@ -118,11 +118,11 @@ Now that you have the ``chiselled-ubuntu-base:latest`` image, you can simply add



To build the final application image, you simply need to add your compiled executable to the ``chiselled-ubuntu-base:latest`` container image. So your new Dockerfile should be similar to:
To build the final application image, you simply need to add your compiled executable to the ``chiselled-ubuntu:latest`` container image. So your new Dockerfile should be similar to:

.. code-block:: dockerfile
FROM chiselled-ubuntu-base:latest
FROM chiselled-ubuntu:latest
COPY app /
ENTRYPOINT [ "./app" ]
Expand Down
2 changes: 1 addition & 1 deletion oci/oci-how-to/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This is where to find the Ubuntu container images:
.. tab:: IronBank

.. note::
Please note that these Ubuntu container images may have special terms of use and fall under Ubuntu Pro. Please reach out if you would like to use the Ubuntu container images from IronBank.
Please note that these Ubuntu container images may have special terms of use and fall under Ubuntu Pro. Please `reach out <[email protected]>`_ if you would like to use the Ubuntu container images from IronBank.



Expand Down
2 changes: 1 addition & 1 deletion oci/oci-reference/oci-image-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Image configuration
The Ubuntu container images are built and published with the following
configurations:

- no default OCI entrypoint,
- no default `OCI entrypoint <https://github.com/opencontainers/image-spec/blob/b30f6ed04f94cd13f95b103f3533612a53cb3062/config.md?plain=1#L157>`_,
- ``bash`` is the default OCI command,
- OCI labels to identify the image name (i.e. ``ubuntu``) and its release.

0 comments on commit f264461

Please sign in to comment.