Skip to content

Commit 1b7d715

Browse files
Copilotimnasnainaec
andcommitted
Pin Docker base images and pip packages to specific versions with SHA256 digests
Co-authored-by: imnasnainaec <6411521+imnasnainaec@users.noreply.github.com>
1 parent 3b9b59a commit 1b7d715

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

.github/workflows/pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ jobs:
3535
python-version: 3.12
3636
- name: Install dependencies
3737
run: |
38-
python -m pip install --upgrade pip
39-
pip install tox
38+
python -m pip install --upgrade pip==25.3
39+
pip install tox==4.32.0
4040
- run: tox -e user-guide-github-pages

.github/workflows/python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
python-version: ${{ matrix.python-version }}
4040
- name: Install dependencies
4141
run: |
42-
python -m pip install --upgrade pip
43-
pip install tox tox-gh-actions
42+
python -m pip install --upgrade pip==25.3
43+
pip install tox==4.32.0 tox-gh-actions==3.5.0
4444
- name: Test with tox
4545
run: tox

Backend/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############################################################
88

99
# Docker multi-stage build
10-
FROM mcr.microsoft.com/dotnet/sdk:8.0.409-jammy AS builder
10+
FROM mcr.microsoft.com/dotnet/sdk:8.0.409-jammy@sha256:31331d856fd10255a3f0882da8449030e4d7121c555b25fd7f2396fd25c8d84f AS builder
1111
WORKDIR /app
1212

1313
# Copy csproj and restore (fetch dependencies) as distinct layers.
@@ -19,7 +19,7 @@ COPY . ./
1919
RUN dotnet publish -c Release -o build
2020

2121
# Build runtime image.
22-
FROM mcr.microsoft.com/dotnet/aspnet:8.0.16-jammy
22+
FROM mcr.microsoft.com/dotnet/aspnet:8.0.16-jammy@sha256:2530333efae1b4c682da1b6eb69c23bfb3d9e80d357b1b30bb4a9c15bf054f25
2323

2424
ENV ASPNETCORE_URLS=http://+:5000
2525
ENV COMBINE_IS_IN_CONTAINER=1

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
############################################################
88

99
# User guide build environment
10-
FROM python:3.12.10-slim-bookworm AS user_guide_builder
10+
FROM python:3.12.10-slim-bookworm@sha256:97983fa8cc88343512862c62307159a82261c3528dc025f79e5a3f7af43e50b4 AS user_guide_builder
1111

1212
ENV PYTHONDONTWRITEBYTECODE=1
1313
ENV PYTHONUNBUFFERED=1
@@ -24,7 +24,7 @@ COPY docs/user_guide docs/user_guide
2424
RUN tox -e user-guide
2525

2626
# Frontend build environment.
27-
FROM node:22.17.0-bookworm-slim AS frontend_builder
27+
FROM node:22.17.0-bookworm-slim@sha256:358a55f9683d8444a810bf36ff1ea4f60522f55a82cada25f7eabdf79e445226 AS frontend_builder
2828
WORKDIR /app
2929

3030
# Install app dependencies.
@@ -36,7 +36,7 @@ COPY . ./
3636
RUN npm run build
3737

3838
# Production environment.
39-
FROM nginx:1.28.0
39+
FROM nginx:1.28.0@sha256:06246bcae987ceb27a9b7274dff88cb3ba44f92cfc0a2f80a15f6c4bf6d5b5a1
4040

4141
WORKDIR /app
4242

database/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - Intel/AMD 64-bit
66
# - ARM 64-bit
77
############################################################
8-
FROM mongo:7.0.20-jammy
8+
FROM mongo:7.0.20-jammy@sha256:365a07aaeb5a54719a162709ca53475b3eeb5e93fe58f69cd6e604bcca26aa6e
99

1010
WORKDIR /
1111

deploy/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# - Intel/AMD 64-bit
66
############################################################
77

8-
FROM python:3.12.10-slim-bookworm
8+
FROM python:3.12.10-slim-bookworm@sha256:97983fa8cc88343512862c62307159a82261c3528dc025f79e5a3f7af43e50b4
99

1010
USER root
1111

maintenance/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
# - ARM 64-bit
1717
############################################################
1818

19+
# Multi-arch base image pinned to version 0.4.0
20+
# amd64 digest: sha256:75c13b324e3e139d17294749b6aabf1e52116c98ca6ba03f7401dbabaa2007da
21+
# arm64 digest: sha256:6f318bee146c0444272a0920903f886e26513bb9d4f1e11327ad9cb368b7f1ae
1922
FROM public.ecr.aws/thecombine/aws-kubectl:0.4.0-$TARGETARCH
2023

2124
USER root

0 commit comments

Comments
 (0)