Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions content/manuals/dhi/migration/examples/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ENTRYPOINT ["/app/main"]
#syntax=docker/dockerfile:1

# === Build stage: Compile Go application ===
FROM dhi.io/golang:1-alpine3.21-dev AS builder
FROM dhi.io/golang:1.25-alpine3.23-dev AS builder

WORKDIR /app
ADD . ./
Expand All @@ -103,7 +103,7 @@ ADD . ./
RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags="-s -w" --installsuffix cgo -o main .

# === Final stage: Create minimal runtime image ===
FROM dhi.io/golang:1-alpine3.21
FROM dhi.io/golang:1.25-alpine3.23

WORKDIR /app
COPY --from=builder /app/main /app/main
Expand All @@ -117,7 +117,7 @@ ENTRYPOINT ["/app/main"]
```dockerfile
#syntax=docker/dockerfile:1

FROM dhi.io/golang:1-alpine3.21-dev
FROM dhi.io/golang:1.25-alpine3.23-dev

WORKDIR /app
ADD . ./
Expand Down
13 changes: 8 additions & 5 deletions content/manuals/dhi/migration/examples/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ Hardened Images. Each example includes five variations:
```dockerfile
#syntax=docker/dockerfile:1

FROM ubuntu/node:18-24.04_edge
FROM ubuntu:24.04

RUN apt-get update && apt-get install -y nodejs npm --no-install-recommends && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

COPY package*.json ./
Expand Down Expand Up @@ -64,7 +67,7 @@ RUN npm install

COPY . .

CMD ["node", "index.js"]
CMD ["index.js"]
```

{{< /tab >}}
Expand Down Expand Up @@ -95,7 +98,7 @@ CMD ["node", "index.js"]
#syntax=docker/dockerfile:1

# === Build stage: Install dependencies and build application ===
FROM dhi.io/node:23-alpine3.21-dev AS builder
FROM dhi.io/node:22-alpine3.23-dev AS builder
WORKDIR /usr/src/app

COPY package*.json ./
Expand All @@ -108,7 +111,7 @@ RUN npm install
COPY . .

# === Final stage: Create minimal runtime image ===
FROM dhi.io/node:23-alpine3.21
FROM dhi.io/node:22-alpine3.23
ENV PATH=/app/node_modules/.bin:$PATH

COPY --from=builder --chown=node:node /usr/src/app /app
Expand All @@ -124,7 +127,7 @@ CMD ["index.js"]
```dockerfile
#syntax=docker/dockerfile:1

FROM dhi.io/node:23-alpine3.21-dev
FROM dhi.io/node:22-alpine3.23-dev
WORKDIR /usr/src/app

COPY package*.json ./
Expand Down
18 changes: 11 additions & 7 deletions content/manuals/dhi/migration/examples/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Hardened Images. Each example includes five variations:
```dockerfile
#syntax=docker/dockerfile:1

FROM ubuntu/python:3.13-24.04_stable AS builder
FROM ubuntu:24.04 AS builder

RUN apt-get update && apt-get install -y python3 python3-pip python3-venv --no-install-recommends && rm -rf /var/lib/apt/lists/*

ENV LANG=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
Expand All @@ -43,12 +45,14 @@ ENV PATH="/app/venv/bin:$PATH"

WORKDIR /app

RUN python -m venv /app/venv
RUN python3 -m venv /app/venv
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

FROM ubuntu/python:3.13-24.04_stable
FROM ubuntu:24.04

RUN apt-get update && apt-get install -y python3 --no-install-recommends && rm -rf /var/lib/apt/lists/*

WORKDIR /app

Expand All @@ -58,7 +62,7 @@ ENV PATH="/app/venv/bin:$PATH"
COPY app.py ./
COPY --from=builder /app/venv /app/venv

ENTRYPOINT [ "python", "/app/app.py" ]
ENTRYPOINT [ "python3", "/app/app.py" ]
```

{{< /tab >}}
Expand Down Expand Up @@ -140,7 +144,7 @@ ENTRYPOINT [ "python", "/app/app.py" ]
#syntax=docker/dockerfile:1

# === Build stage: Install dependencies and create virtual environment ===
FROM dhi.io/python:3.13-alpine3.21-dev AS builder
FROM dhi.io/python:3.13-alpine3.23-dev AS builder

ENV LANG=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
Expand All @@ -158,7 +162,7 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# === Final stage: Create minimal runtime image ===
FROM dhi.io/python:3.13-alpine3.21
FROM dhi.io/python:3.13-alpine3.23

WORKDIR /app

Expand All @@ -177,7 +181,7 @@ ENTRYPOINT [ "python", "/app/app.py" ]
```dockerfile
#syntax=docker/dockerfile:1

FROM dhi.io/python:3.13-alpine3.21-dev
FROM dhi.io/python:3.13-alpine3.23-dev

ENV LANG=C.UTF-8
ENV PYTHONDONTWRITEBYTECODE=1
Expand Down