forked from docker/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: refresh image versions in examples
use current LTS versions of ubuntu where suitable, remove uses of ubuntu:23.10 (which reache EOL), and and update some other examples to use more current versions. Signed-off-by: Sebastiaan van Stijn <[email protected]>
- Loading branch information
Showing
12 changed files
with
106 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,8 +107,8 @@ refer to [understand images, containers, and storage drivers](https://docs.docke | |
So far, you've pulled images by their name (and "tag"). Using names and tags is | ||
a convenient way to work with images. When using tags, you can `docker pull` an | ||
image again to make sure you have the most up-to-date version of that image. | ||
For example, `docker pull ubuntu:22.04` pulls the latest version of the Ubuntu | ||
22.04 image. | ||
For example, `docker pull ubuntu:24.04` pulls the latest version of the Ubuntu | ||
24.04 image. | ||
|
||
In some cases you don't want images to be updated to newer versions, but prefer | ||
to use a fixed version of an image. Docker enables you to pull an image by its | ||
|
@@ -117,23 +117,23 @@ of an image to pull. Doing so, allows you to "pin" an image to that version, | |
and guarantee that the image you're using is always the same. | ||
|
||
To know the digest of an image, pull the image first. Let's pull the latest | ||
`ubuntu:22.04` image from Docker Hub: | ||
`ubuntu:24.04` image from Docker Hub: | ||
|
||
```console | ||
$ docker pull ubuntu:22.04 | ||
$ docker pull ubuntu:24.04 | ||
|
||
22.04: Pulling from library/ubuntu | ||
24.04: Pulling from library/ubuntu | ||
125a6e411906: Pull complete | ||
Digest: sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d | ||
Status: Downloaded newer image for ubuntu:22.04 | ||
docker.io/library/ubuntu:22.04 | ||
Digest: sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30 | ||
Status: Downloaded newer image for ubuntu:24.04 | ||
docker.io/library/ubuntu:24.04 | ||
``` | ||
|
||
Docker prints the digest of the image after the pull has finished. In the example | ||
above, the digest of the image is: | ||
|
||
```console | ||
sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d | ||
sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30 | ||
``` | ||
|
||
Docker also prints the digest of an image when pushing to a registry. This | ||
|
@@ -143,18 +143,18 @@ A digest takes the place of the tag when pulling an image, for example, to | |
pull the above image by digest, run the following command: | ||
|
||
```console | ||
$ docker pull ubuntu@sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d | ||
$ docker pull ubuntu@sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30 | ||
|
||
docker.io/library/ubuntu@sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d: Pulling from library/ubuntu | ||
Digest: sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d | ||
Status: Image is up to date for ubuntu@sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d | ||
docker.io/library/ubuntu@sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d | ||
docker.io/library/ubuntu@sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30: Pulling from library/ubuntu | ||
Digest: sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30 | ||
Status: Image is up to date for ubuntu@sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30 | ||
docker.io/library/ubuntu@sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30 | ||
``` | ||
|
||
Digest can also be used in the `FROM` of a Dockerfile, for example: | ||
|
||
```dockerfile | ||
FROM ubuntu@sha256:26c68657ccce2cb0a31b330cb0be2b5e108d467f641c62e13ab40cbec258c68d | ||
FROM ubuntu@sha256:2e863c44b718727c860746568e1d54afd13b2fa71b160f5cd9058fc436217b30 | ||
LABEL org.opencontainers.image.authors="some maintainer <[email protected]>" | ||
``` | ||
|
||
|
@@ -215,13 +215,11 @@ shorthand) to see the images that were pulled. The example below shows all the | |
```console | ||
$ docker image ls --filter reference=ubuntu | ||
REPOSITORY TAG IMAGE ID CREATED SIZE | ||
ubuntu 18.04 c6ad7e71ba7d 5 weeks ago 63.2MB | ||
ubuntu bionic c6ad7e71ba7d 5 weeks ago 63.2MB | ||
ubuntu 22.04 5ccefbfc0416 2 months ago 78MB | ||
ubuntu focal ff0fea8310f3 2 months ago 72.8MB | ||
ubuntu latest ff0fea8310f3 2 months ago 72.8MB | ||
ubuntu jammy 41ba606c8ab9 3 months ago 79MB | ||
ubuntu 20.04 ba6acccedd29 7 months ago 72.8MB | ||
ubuntu 22.04 8a3cdc4d1ad3 3 weeks ago 77.9MB | ||
ubuntu jammy 8a3cdc4d1ad3 3 weeks ago 77.9MB | ||
ubuntu 24.04 35a88802559d 6 weeks ago 78.1MB | ||
ubuntu latest 35a88802559d 6 weeks ago 78.1MB | ||
ubuntu noble 35a88802559d 6 weeks ago 78.1MB | ||
``` | ||
|
||
### Cancel a pull | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.