Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
2. In the `Dockerfile`, define your base image by adding the following line:

```dockerfile
FROM eclipse-temurin:21.0.2_13-jdk-jammy
FROM eclipse-temurin:21.0.8_9-jdk-jammy
```

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.
Expand Down Expand Up @@ -190,7 +190,7 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
And with that, you should have the following Dockerfile:

```dockerfile
FROM eclipse-temurin:21.0.2_13-jdk-jammy
FROM eclipse-temurin:21.0.8_9-jdk-jammy
WORKDIR /app
COPY .mvn/ .mvn
COPY mvnw pom.xml ./
Expand Down Expand Up @@ -268,15 +268,15 @@ Now that you have the project, you’re ready to create the `Dockerfile`.
1. Consider the following Dockerfile:

```dockerfile
FROM eclipse-temurin:21.0.2_13-jdk-jammy AS builder
FROM eclipse-temurin:21.0.8_9-jdk-jammy AS builder
WORKDIR /opt/app
COPY .mvn/ .mvn
COPY mvnw pom.xml ./
RUN ./mvnw dependency:go-offline
COPY ./src ./src
RUN ./mvnw clean install

FROM eclipse-temurin:21.0.2_13-jre-jammy AS final
FROM eclipse-temurin:21.0.8_9-jre-jammy AS final
WORKDIR /opt/app
EXPOSE 8080
COPY --from=builder /opt/app/target/*.jar /opt/app/*.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


```dockerfile
FROM node:20-alpine
FROM node:22-alpine
WORKDIR /app
COPY . .
RUN yarn install --production
Expand Down Expand Up @@ -69,7 +69,7 @@


```dockerfile
FROM node:20-alpine
FROM node:22-alpine
WORKDIR /app
COPY . .
RUN yarn install --production
Expand Down Expand Up @@ -144,7 +144,7 @@
<tr>
<td>2
</td>
<td>Load metadata for docker.io/library/node:20-alpine
<td>Load metadata for docker.io/library/node:22-alpine

Check failure on line 147 in content/get-started/docker-concepts/building-images/using-the-build-cache.md

View workflow job for this annotation

GitHub Actions / validate (vale)

[vale] reported by reviewdog 🐶 [Docker.Capitalization] Please capitalize Docker. Raw Output: {"message": "[Docker.Capitalization] Please capitalize Docker.", "location": {"path": "content/get-started/docker-concepts/building-images/using-the-build-cache.md", "range": {"start": {"line": 147, "column": 29}}}, "severity": "ERROR"}
</td>
<td>2.7 seconds
</td>
Expand Down Expand Up @@ -233,7 +233,7 @@
6. Update the Dockerfile to copy in the `package.json` file first, install dependencies, and then copy everything else in.

```dockerfile
FROM node:20-alpine
FROM node:22-alpine
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --production
Expand Down Expand Up @@ -262,10 +262,10 @@
=> => transferring dockerfile: 175B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:21-alpine 0.0s
=> [internal] load metadata for docker.io/library/node:22-alpine 0.0s
=> [internal] load build context 0.8s
=> => transferring context: 53.37MB 0.8s
=> [1/5] FROM docker.io/library/node:21-alpine 0.0s
=> [1/5] FROM docker.io/library/node:22-alpine 0.0s
=> CACHED [2/5] WORKDIR /app 0.0s
=> [3/5] COPY package.json yarn.lock ./ 0.2s
=> [4/5] RUN yarn install --production 14.0s
Expand Down Expand Up @@ -295,10 +295,10 @@
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/node:21-alpine 0.0s
=> [internal] load metadata for docker.io/library/node:22-alpine 0.0s
=> [internal] load build context 0.2s
=> => transferring context: 450.43kB 0.2s
=> [1/5] FROM docker.io/library/node:21-alpine 0.0s
=> [1/5] FROM docker.io/library/node:22-alpine 0.0s
=> CACHED [2/5] WORKDIR /app 0.0s
=> CACHED [3/5] COPY package.json yarn.lock ./ 0.0s
=> CACHED [4/5] RUN yarn install --production 0.0s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A Dockerfile is a text-based document that's used to create a container image. I
As an example, the following Dockerfile would produce a ready-to-run Python application:

```dockerfile
FROM python:3.12
FROM python:3.13
WORKDIR /usr/local/app

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

### Set up

[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.
[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.

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.

### Creating the Dockerfile

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

```dockerfile
FROM node:20-alpine
FROM node:22-alpine
```

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.
Expand Down Expand Up @@ -117,7 +119,7 @@ Now that you have the project, you’re ready to create the `Dockerfile`.


```dockerfile
FROM node:20-alpine
FROM node:22-alpine
WORKDIR /app
COPY . .
RUN yarn install --production
Expand Down
Loading