mirror of https://github.com/docker/docs.git
remove ubuntu 18.04 from examples
Ubuntu 18.04 reached end of standard support, so remove it from examples in our docs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c7705008cb
commit
a1c30d0af9
|
@ -856,7 +856,7 @@ a partial image ID.
|
|||
image: redis
|
||||
```
|
||||
```yaml
|
||||
image: ubuntu:18.04
|
||||
image: ubuntu:22.04
|
||||
```
|
||||
```yaml
|
||||
image: tutum/influxdb
|
||||
|
|
|
@ -805,7 +805,7 @@ services:
|
|||
placement:
|
||||
constraints:
|
||||
- "node.role==manager"
|
||||
- "engine.labels.operatingsystem==ubuntu 18.04"
|
||||
- "engine.labels.operatingsystem==ubuntu 22.04"
|
||||
preferences:
|
||||
- spread: node.labels.zone
|
||||
```
|
||||
|
@ -1302,7 +1302,7 @@ a partial image ID.
|
|||
image: redis
|
||||
```
|
||||
```yaml
|
||||
image: ubuntu:18.04
|
||||
image: ubuntu:22.04
|
||||
```
|
||||
```yaml
|
||||
image: tutum/influxdb
|
||||
|
|
|
@ -24,7 +24,8 @@ changes from the previous layer. The following is the contents of an example Doc
|
|||
|
||||
```dockerfile
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:18.04
|
||||
|
||||
FROM ubuntu:22.04
|
||||
COPY . /app
|
||||
RUN make /app
|
||||
CMD python /app/app.py
|
||||
|
@ -32,7 +33,7 @@ CMD python /app/app.py
|
|||
|
||||
Each instruction creates one layer:
|
||||
|
||||
- `FROM` creates a layer from the `ubuntu:18.04` Docker image.
|
||||
- `FROM` creates a layer from the `ubuntu:22.04` Docker image.
|
||||
- `COPY` adds files from your Docker client's current directory.
|
||||
- `RUN` builds your application with `make`.
|
||||
- `CMD` specifies what command to run within the container.
|
||||
|
@ -448,7 +449,8 @@ subsequent `apt-get install` instructions fail. For example, the issue will occu
|
|||
|
||||
```dockerfile
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:18.04
|
||||
|
||||
FROM ubuntu:22.04
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl
|
||||
```
|
||||
|
@ -458,7 +460,8 @@ modify `apt-get install` by adding an extra package as shown in the following Do
|
|||
|
||||
```dockerfile
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:18.04
|
||||
|
||||
FROM ubuntu:22.04
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y curl nginx
|
||||
```
|
||||
|
@ -890,4 +893,3 @@ These Official Images have exemplary Dockerfiles:
|
|||
* [Guidelines for Creating Docker Official Images](../../docker-hub/official_images.md)
|
||||
* [Best practices to containerize Node.js web applications with Docker](https://snyk.io/blog/10-best-practices-to-containerize-nodejs-web-applications-with-docker){:target="_blank" rel="noopener" class="_"}
|
||||
* [More about Base Images](../../build/building/base-images.md)
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ read-only. Consider the following Dockerfile:
|
|||
|
||||
```dockerfile
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM ubuntu:18.04
|
||||
|
||||
FROM ubuntu:22.04
|
||||
LABEL org.opencontainers.image.authors="org@example.com"
|
||||
COPY . /app
|
||||
RUN make /app
|
||||
|
@ -48,7 +49,7 @@ CMD python /app/app.py
|
|||
```
|
||||
|
||||
This Dockerfile contains four commands. Commands that modify the filesystem create
|
||||
a layer. The `FROM` statement starts out by creating a layer from the `ubuntu:18.04`
|
||||
a layer. The `FROM` statement starts out by creating a layer from the `ubuntu:22.04`
|
||||
image. The `LABEL` command only modifies the image's metadata, and does not produce
|
||||
a new layer. The `COPY` command adds some files from your Docker client's current
|
||||
directory. The first `RUN` command builds your application using the `make` command,
|
||||
|
@ -157,14 +158,15 @@ usually `/var/lib/docker/` on Linux hosts. You can see these layers being pulled
|
|||
in this example:
|
||||
|
||||
```console
|
||||
$ docker pull ubuntu:18.04
|
||||
18.04: Pulling from library/ubuntu
|
||||
$ docker pull ubuntu:22.04
|
||||
22.04: Pulling from library/ubuntu
|
||||
f476d66f5408: Pull complete
|
||||
8882c27f669e: Pull complete
|
||||
d9af21273955: Pull complete
|
||||
f5029279ec12: Pull complete
|
||||
Digest: sha256:ab6cb8de3ad7bb33e2534677f865008535427390b117d7939193f8d1a6613e34
|
||||
Status: Downloaded newer image for ubuntu:18.04
|
||||
Digest: sha256:6120be6a2b7ce665d0cbddc3ce6eae60fe94637c6a66985312d1f02f63cc0bcd
|
||||
Status: Downloaded newer image for ubuntu:22.04
|
||||
docker.io/library/ubuntu:22.04
|
||||
```
|
||||
|
||||
Each of these layers is stored in its own directory inside the Docker host's
|
||||
|
|
Loading…
Reference in New Issue