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
|
image: redis
|
||||||
```
|
```
|
||||||
```yaml
|
```yaml
|
||||||
image: ubuntu:18.04
|
image: ubuntu:22.04
|
||||||
```
|
```
|
||||||
```yaml
|
```yaml
|
||||||
image: tutum/influxdb
|
image: tutum/influxdb
|
||||||
|
|
|
@ -805,7 +805,7 @@ services:
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- "node.role==manager"
|
- "node.role==manager"
|
||||||
- "engine.labels.operatingsystem==ubuntu 18.04"
|
- "engine.labels.operatingsystem==ubuntu 22.04"
|
||||||
preferences:
|
preferences:
|
||||||
- spread: node.labels.zone
|
- spread: node.labels.zone
|
||||||
```
|
```
|
||||||
|
@ -1302,7 +1302,7 @@ a partial image ID.
|
||||||
image: redis
|
image: redis
|
||||||
```
|
```
|
||||||
```yaml
|
```yaml
|
||||||
image: ubuntu:18.04
|
image: ubuntu:22.04
|
||||||
```
|
```
|
||||||
```yaml
|
```yaml
|
||||||
image: tutum/influxdb
|
image: tutum/influxdb
|
||||||
|
|
|
@ -24,7 +24,8 @@ changes from the previous layer. The following is the contents of an example Doc
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN make /app
|
RUN make /app
|
||||||
CMD python /app/app.py
|
CMD python /app/app.py
|
||||||
|
@ -32,7 +33,7 @@ CMD python /app/app.py
|
||||||
|
|
||||||
Each instruction creates one layer:
|
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.
|
- `COPY` adds files from your Docker client's current directory.
|
||||||
- `RUN` builds your application with `make`.
|
- `RUN` builds your application with `make`.
|
||||||
- `CMD` specifies what command to run within the container.
|
- `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
|
```dockerfile
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y curl
|
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
|
```dockerfile
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y curl nginx
|
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)
|
* [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="_"}
|
* [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)
|
* [More about Base Images](../../build/building/base-images.md)
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,8 @@ read-only. Consider the following Dockerfile:
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
FROM ubuntu:22.04
|
||||||
LABEL org.opencontainers.image.authors="org@example.com"
|
LABEL org.opencontainers.image.authors="org@example.com"
|
||||||
COPY . /app
|
COPY . /app
|
||||||
RUN make /app
|
RUN make /app
|
||||||
|
@ -48,7 +49,7 @@ CMD python /app/app.py
|
||||||
```
|
```
|
||||||
|
|
||||||
This Dockerfile contains four commands. Commands that modify the filesystem create
|
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
|
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
|
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,
|
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:
|
in this example:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker pull ubuntu:18.04
|
$ docker pull ubuntu:22.04
|
||||||
18.04: Pulling from library/ubuntu
|
22.04: Pulling from library/ubuntu
|
||||||
f476d66f5408: Pull complete
|
f476d66f5408: Pull complete
|
||||||
8882c27f669e: Pull complete
|
8882c27f669e: Pull complete
|
||||||
d9af21273955: Pull complete
|
d9af21273955: Pull complete
|
||||||
f5029279ec12: Pull complete
|
f5029279ec12: Pull complete
|
||||||
Digest: sha256:ab6cb8de3ad7bb33e2534677f865008535427390b117d7939193f8d1a6613e34
|
Digest: sha256:6120be6a2b7ce665d0cbddc3ce6eae60fe94637c6a66985312d1f02f63cc0bcd
|
||||||
Status: Downloaded newer image for ubuntu:18.04
|
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
|
Each of these layers is stored in its own directory inside the Docker host's
|
||||||
|
|
Loading…
Reference in New Issue