diff --git a/content/manuals/dhi/migration/examples/go.md b/content/manuals/dhi/migration/examples/go.md index 259a4361119..3a42bdc50a9 100644 --- a/content/manuals/dhi/migration/examples/go.md +++ b/content/manuals/dhi/migration/examples/go.md @@ -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 . ./ @@ -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 @@ -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 . ./ diff --git a/content/manuals/dhi/migration/examples/node.md b/content/manuals/dhi/migration/examples/node.md index 07ddd36b68e..3019df3f8d1 100644 --- a/content/manuals/dhi/migration/examples/node.md +++ b/content/manuals/dhi/migration/examples/node.md @@ -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 ./ @@ -64,7 +67,7 @@ RUN npm install COPY . . -CMD ["node", "index.js"] +CMD ["index.js"] ``` {{< /tab >}} @@ -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 ./ @@ -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 @@ -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 ./ diff --git a/content/manuals/dhi/migration/examples/python.md b/content/manuals/dhi/migration/examples/python.md index a844acc5dbc..4ee4d327551 100644 --- a/content/manuals/dhi/migration/examples/python.md +++ b/content/manuals/dhi/migration/examples/python.md @@ -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 @@ -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 @@ -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 >}} @@ -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 @@ -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 @@ -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