Skip to content

Commit 19961dd

Browse files
authored
Couple of freshness updates to the Docker Concepts pages (#23361)
## Description Couple of small freshness updates to the concepts pages. Note that I didn't update any screenshots, despite many of them being old. Most screenshots are still valid, but on older designs. Can do another PR for screenshot updates if desired.
1 parent c3df922 commit 19961dd

File tree

3 files changed

+40
-34
lines changed

3 files changed

+40
-34
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: 30 additions & 26 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
@@ -121,20 +121,23 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
121121

122122

123123
<table>
124-
<tr>
125-
<td>Steps
126-
</td>
127-
<td>Description
128-
</td>
129-
<td>Time Taken(1st Run)
130-
</td>
131-
<td>Time Taken (2nd Run)
132-
</td>
133-
</tr>
124+
<thead>
125+
<tr>
126+
<th>Steps
127+
</th>
128+
<th>Description
129+
</th>
130+
<th>Time Taken (1st Run)
131+
</th>
132+
<th>Time Taken (2nd Run)
133+
</th>
134+
</tr>
135+
</thead>
136+
<tbody>
134137
<tr>
135138
<td>1
136139
</td>
137-
<td>Load build definition from Dockerfile
140+
<td><code>Load build definition from Dockerfile</code>
138141
</td>
139142
<td>0.0 seconds
140143
</td>
@@ -144,7 +147,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
144147
<tr>
145148
<td>2
146149
</td>
147-
<td>Load metadata for docker.io/library/node:20-alpine
150+
<td><code>Load metadata for docker.io/library/node:22-alpine</code>
148151
</td>
149152
<td>2.7 seconds
150153
</td>
@@ -154,7 +157,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
154157
<tr>
155158
<td>3
156159
</td>
157-
<td>Load .dockerignore
160+
<td><code>Load .dockerignore</code>
158161
</td>
159162
<td>0.0 seconds
160163
</td>
@@ -164,7 +167,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
164167
<tr>
165168
<td>4
166169
</td>
167-
<td>Load build context
170+
<td><code>Load build context</code>
168171
<p>
169172
(Context size: 4.60MB)
170173
</td>
@@ -176,7 +179,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
176179
<tr>
177180
<td>5
178181
</td>
179-
<td>Set the working directory (WORKDIR)
182+
<td><code>Set the working directory (WORKDIR)</code>
180183
</td>
181184
<td>0.1 seconds
182185
</td>
@@ -186,7 +189,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
186189
<tr>
187190
<td>6
188191
</td>
189-
<td>Copy the local code into the container
192+
<td><code>Copy the local code into the container</code>
190193
</td>
191194
<td>0.0 seconds
192195
</td>
@@ -196,7 +199,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
196199
<tr>
197200
<td>7
198201
</td>
199-
<td>Run yarn install --production
202+
<td><code>Run yarn install --production</code>
200203
</td>
201204
<td>10.0 seconds
202205
</td>
@@ -206,7 +209,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
206209
<tr>
207210
<td>8
208211
</td>
209-
<td>Exporting layers
212+
<td><code>Exporting layers</code>
210213
</td>
211214
<td>2.2 seconds
212215
</td>
@@ -216,13 +219,14 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
216219
<tr>
217220
<td>9
218221
</td>
219-
<td>Exporting the final image
222+
<td><code>Exporting the final image</code>
220223
</td>
221224
<td>3.0 seconds
222225
</td>
223226
<td>0.0 seconds
224227
</td>
225228
</tr>
229+
</tbody>
226230
</table>
227231

228232

@@ -233,7 +237,7 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
233237
6. Update the Dockerfile to copy in the `package.json` file first, install dependencies, and then copy everything else in.
234238

235239
```dockerfile
236-
FROM node:20-alpine
240+
FROM node:22-alpine
237241
WORKDIR /app
238242
COPY package.json yarn.lock ./
239243
RUN yarn install --production
@@ -262,10 +266,10 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
262266
=> => transferring dockerfile: 175B 0.0s
263267
=> [internal] load .dockerignore 0.0s
264268
=> => transferring context: 2B 0.0s
265-
=> [internal] load metadata for docker.io/library/node:21-alpine 0.0s
269+
=> [internal] load metadata for docker.io/library/node:22-alpine 0.0s
266270
=> [internal] load build context 0.8s
267271
=> => transferring context: 53.37MB 0.8s
268-
=> [1/5] FROM docker.io/library/node:21-alpine 0.0s
272+
=> [1/5] FROM docker.io/library/node:22-alpine 0.0s
269273
=> CACHED [2/5] WORKDIR /app 0.0s
270274
=> [3/5] COPY package.json yarn.lock ./ 0.2s
271275
=> [4/5] RUN yarn install --production 14.0s
@@ -295,10 +299,10 @@ In this hands-on guide, you will learn how to use the Docker build cache effecti
295299
=> => transferring dockerfile: 37B 0.0s
296300
=> [internal] load .dockerignore 0.0s
297301
=> => transferring context: 2B 0.0s
298-
=> [internal] load metadata for docker.io/library/node:21-alpine 0.0s
302+
=> [internal] load metadata for docker.io/library/node:22-alpine 0.0s
299303
=> [internal] load build context 0.2s
300304
=> => transferring context: 450.43kB 0.2s
301-
=> [1/5] FROM docker.io/library/node:21-alpine 0.0s
305+
=> [1/5] FROM docker.io/library/node:22-alpine 0.0s
302306
=> CACHED [2/5] WORKDIR /app 0.0s
303307
=> CACHED [3/5] COPY package.json yarn.lock ./ 0.0s
304308
=> 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)