From 987c4a93577cc945c20e8f893c6dd4fc62927d6e Mon Sep 17 00:00:00 2001 From: Alessandro Lenzen Date: Mon, 14 Jun 2021 16:06:55 +0200 Subject: [PATCH 1/3] fix links to glossary --- develop/develop-images/baseimages.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/develop/develop-images/baseimages.md b/develop/develop-images/baseimages.md index 59a534d1aa..8ef261f767 100644 --- a/develop/develop-images/baseimages.md +++ b/develop/develop-images/baseimages.md @@ -11,13 +11,13 @@ Most Dockerfiles start from a parent image. If you need to completely control the contents of your image, you might need to create a base image instead. Here's the difference: -- A [parent image](../../glossary.md#parent_image) is the image that your +- A [parent image](../../glossary.md#parent-image) is the image that your image is based on. It refers to the contents of the `FROM` directive in the Dockerfile. Each subsequent declaration in the Dockerfile modifies this parent image. Most Dockerfiles start from a parent image, rather than a base image. However, the terms are sometimes used interchangeably. -- A [base image](../../glossary.md#base_image) has `FROM scratch` in its Dockerfile. +- A [base image](../../glossary.md#base-image) has `FROM scratch` in its Dockerfile. This topic shows you several ways to create a base image. The specific process will depend heavily on the Linux distribution you want to package. We have some From c01d6232daa1e9f6b7ab5ee5328b08e5e14fed36 Mon Sep 17 00:00:00 2001 From: Alessandro Lenzen Date: Mon, 14 Jun 2021 16:07:22 +0200 Subject: [PATCH 2/3] update example from xenial/16.04 to focal/20.04 --- develop/develop-images/baseimages.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/develop/develop-images/baseimages.md b/develop/develop-images/baseimages.md index 8ef261f767..9457913dae 100644 --- a/develop/develop-images/baseimages.md +++ b/develop/develop-images/baseimages.md @@ -34,17 +34,17 @@ use to build Ubuntu images. It can be as simple as this to create an Ubuntu parent image: - $ sudo debootstrap xenial xenial > /dev/null - $ sudo tar -C xenial -c . | docker import - xenial + $ sudo debootstrap focal focal > /dev/null + $ sudo tar -C focal -c . | docker import - focal - a29c15f1bf7a + sha256:81ec9a55a92a5618161f68ae691d092bf14d700129093158297b3d01593f4ee3 - $ docker run xenial cat /etc/lsb-release + $ docker run focal cat /etc/lsb-release DISTRIB_ID=Ubuntu - DISTRIB_RELEASE=16.04 - DISTRIB_CODENAME=xenial - DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" + DISTRIB_RELEASE=20.04 + DISTRIB_CODENAME=focal + DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS" There are more example scripts for creating parent images in [the Docker GitHub repository](https://github.com/docker/docker/blob/master/contrib). @@ -86,7 +86,7 @@ current directory. > You can use a Docker container to build it: > > ```bash -> $ docker run --rm -it -v $PWD:/build ubuntu:16.04 +> $ docker run --rm -it -v $PWD:/build ubuntu:20.04 > > container# apt-get update && apt-get install build-essential > container# cd /build From 1ef73b3a8a04b89191e8a7dd640372785959a338 Mon Sep 17 00:00:00 2001 From: Alessandro Lenzen Date: Mon, 14 Jun 2021 16:20:41 +0200 Subject: [PATCH 3/3] fix segfault --- develop/develop-images/baseimages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop/develop-images/baseimages.md b/develop/develop-images/baseimages.md index 9457913dae..932957b472 100644 --- a/develop/develop-images/baseimages.md +++ b/develop/develop-images/baseimages.md @@ -90,7 +90,7 @@ current directory. > > container# apt-get update && apt-get install build-essential > container# cd /build -> container# gcc -o hello -static -nostartfiles hello.c +> container# gcc -o hello -static hello.c > ``` To run your new image, use the `docker run` command: