Merge pull request #13016 from alenzen/patch

improve documentation
This commit is contained in:
Usha Mandya 2021-06-25 12:07:25 +01:00 committed by GitHub
commit eb50246437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -34,17 +34,17 @@ use to build Ubuntu images.
It can be as simple as this to create an Ubuntu parent image: It can be as simple as this to create an Ubuntu parent image:
$ sudo debootstrap xenial xenial > /dev/null $ sudo debootstrap focal focal > /dev/null
$ sudo tar -C xenial -c . | docker import - xenial $ 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_ID=Ubuntu
DISTRIB_RELEASE=16.04 DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=xenial DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS" DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS"
There are more example scripts for creating parent images in [the Docker There are more example scripts for creating parent images in [the Docker
GitHub repository](https://github.com/docker/docker/blob/master/contrib). GitHub repository](https://github.com/docker/docker/blob/master/contrib).
@ -86,11 +86,11 @@ current directory.
> You can use a Docker container to build it: > You can use a Docker container to build it:
> >
> ```bash > ```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# apt-get update && apt-get install build-essential
> container# cd /build > 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: To run your new image, use the `docker run` command: