Skip to content

Commit c968120

Browse files
committed
Couple of freshness updates to the Docker Concepts pages
1 parent c3df922 commit c968120

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

content/get-started/docker-concepts/building-images/multi-stage-builds.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
152152
2. In the `Dockerfile`, define your base image by adding the following line:
153153
154154
```dockerfile
155-
FROM eclipse-temurin:21.0.2_13-jdk-jammy
155+
FROM eclipse-temurin:21.0.8_9-jdk-jammy
156156
```
157157
158158
3. Now, define the working directory by using the `WORKDIR` instruction. This will specify where future commands will run and the directory files will be copied inside the container image.
@@ -190,7 +190,7 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
190190
And with that, you should have the following Dockerfile:
191191
192192
```dockerfile
193-
FROM eclipse-temurin:21.0.2_13-jdk-jammy
193+
FROM eclipse-temurin:21.0.8_9-jdk-jammy
194194
WORKDIR /app
195195
COPY .mvn/ .mvn
196196
COPY mvnw pom.xml ./
@@ -268,15 +268,15 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
268268
1. Consider the following Dockerfile:
269269
270270
```dockerfile
271-
FROM eclipse-temurin:21.0.2_13-jdk-jammy AS builder
271+
FROM eclipse-temurin:21.0.8_9-jdk-jammy AS builder
272272
WORKDIR /opt/app
273273
COPY .mvn/ .mvn
274274
COPY mvnw pom.xml ./
275275
RUN ./mvnw dependency:go-offline
276276
COPY ./src ./src
277277
RUN ./mvnw clean install
278278
279-
FROM eclipse-temurin:21.0.2_13-jre-jammy AS final
279+
FROM eclipse-temurin:21.0.8_9-jre-jammy AS final
280280
WORKDIR /opt/app
281281
EXPOSE 8080
282282
COPY --from=builder /opt/app/target/*.jar /opt/app/*.jar

content/get-started/docker-concepts/building-images/using-the-build-cache.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Consider the following Dockerfile that you created for the [getting-started](./w
2222

2323

2424
```dockerfile
25-
FROM node:20-alpine
25+
FROM node:22-alpine
2626
WORKDIR /app
2727
COPY . .
2828
RUN yarn install --production
@@ -69,7 +69,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
6969

7070

7171
```dockerfile
72-
FROM node:20-alpine
72+
FROM node:22-alpine
7373
WORKDIR /app
7474
COPY . .
7575
RUN yarn install --production
@@ -144,7 +144,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
144144
<tr>
145145
<td>2
146146
</td>
147-
<td>Load metadata for docker.io/library/node:20-alpine
147+
<td>Load metadata for docker.io/library/node:22-alpine
148148
</td>
149149
<td>2.7 seconds
150150
</td>
@@ -233,7 +233,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
233233
6. Update the Dockerfile to copy in the `package.json` file first, install dependencies, and then copy everything else in.
234234

235235
```dockerfile
236-
FROM node:20-alpine
236+
FROM node:22-alpine
237237
WORKDIR /app
238238
COPY package.json yarn.lock ./
239239
RUN yarn install --production
@@ -262,10 +262,10 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
262262
=> => transferring dockerfile: 175B 0.0s
263263
=> [internal] load .dockerignore 0.0s
264264
=> => transferring context: 2B 0.0s
265-
=> [internal] load metadata for docker.io/library/node:21-alpine 0.0s
265+
=> [internal] load metadata for docker.io/library/node:22-alpine 0.0s
266266
=> [internal] load build context 0.8s
267267
=> => transferring context: 53.37MB 0.8s
268-
=> [1/5] FROM docker.io/library/node:21-alpine 0.0s
268+
=> [1/5] FROM docker.io/library/node:22-alpine 0.0s
269269
=> CACHED [2/5] WORKDIR /app 0.0s
270270
=> [3/5] COPY package.json yarn.lock ./ 0.2s
271271
=> [4/5] RUN yarn install --production 14.0s
@@ -295,10 +295,10 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
295295
=> => transferring dockerfile: 37B 0.0s
296296
=> [internal] load .dockerignore 0.0s
297297
=> => transferring context: 2B 0.0s
298-
=> [internal] load metadata for docker.io/library/node:21-alpine 0.0s
298+
=> [internal] load metadata for docker.io/library/node:22-alpine 0.0s
299299
=> [internal] load build context 0.2s
300300
=> => transferring context: 450.43kB 0.2s
301-
=> [1/5] FROM docker.io/library/node:21-alpine 0.0s
301+
=> [1/5] FROM docker.io/library/node:22-alpine 0.0s
302302
=> CACHED [2/5] WORKDIR /app 0.0s
303303
=> CACHED [3/5] COPY package.json yarn.lock ./ 0.0s
304304
=> CACHED [4/5] RUN yarn install --production 0.0s

content/get-started/docker-concepts/building-images/writing-a-dockerfile.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A Dockerfile is a text-based document that's used to create a container image. I
2222
As an example, the following Dockerfile would produce a ready-to-run Python application:
2323

2424
```dockerfile
25-
FROM python:3.12
25+
FROM python:3.13
2626
WORKDIR /usr/local/app
2727

2828
# Install the application dependencies
@@ -69,7 +69,9 @@ In this quick hands-on guide, you'll write a Dockerfile that builds a simple Nod
6969

7070
### Set up
7171

72-
[Download this ZIP file](https://github.com/docker/getting-started-todo-app/raw/build-image-from-scratch/app.zip) and extract the contents into a directory on your machine.
72+
[Download this ZIP file](https://github.com/docker/getting-started-todo-app/archive/refs/heads/build-image-from-scratch.zip) and extract the contents into a directory on your machine.
73+
74+
If you'd rather not download a ZIP file, clone the https://github.com/docker/getting-started-todo-app project and checkout the `build-image-from-scratch` branch.
7375

7476
### Creating the Dockerfile
7577

@@ -87,7 +89,7 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
8789
3. In the `Dockerfile`, define your base image by adding the following line:
8890

8991
```dockerfile
90-
FROM node:20-alpine
92+
FROM node:22-alpine
9193
```
9294

9395
4. Now, define the working directory by using the `WORKDIR` instruction. This will specify where future commands will run and the directory files will be copied inside the container image.
@@ -117,7 +119,7 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
117119
118120
119121
```dockerfile
120-
FROM node:20-alpine
122+
FROM node:22-alpine
121123
WORKDIR /app
122124
COPY . .
123125
RUN yarn install --production

0 commit comments

Comments
 (0)