Skip to content

Commit abf50e6

Browse files
committed
build: update python:3-alpine version
Update the sha256 sum used to download the current 3-alpine version. Also abstracted it into a variable (argument) that is used in both the build and deployment images.
1 parent 275a30f commit abf50e6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/Docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# docker run --rm -v /.../issue.tracker:/usr/src/app/tracker \
99
# -p 9017:8080 roundup-app:latest
1010

11+
# parameterize the sha256 sum to pin version of python:3-alpine
12+
ARG SHA256=5d769f990397afbb2aca24b0655e404c0f2806d268f454b052e81e39d87abf42
1113

1214
# Global vars for all build stages
1315
ARG VERBOSE=
@@ -26,8 +28,8 @@ ARG source=local
2628
# COPY from install dir in second stage.
2729
ARG pythonversion=3.11
2830

29-
#FROM python:3-alpine
30-
FROM python@sha256:603975e62d85aa07578034d3d10ffa1983b7618a6abb6371cf51941be6b8842c as build
31+
#FROM python:3-alpine via SHA256 sum
32+
FROM python@sha256:$SHA256 as build
3133

3234
# Inherit global values https://github.com/moby/moby/issues/37345
3335
ARG appdir
@@ -158,7 +160,7 @@ RUN if [ -n "$pip_mod" ]; then pip install --no-cache-dir ${pip_mod}; fi
158160
# build a new smaller docker image for execution. Build image above
159161
# is 1G in size.
160162
# FROM python:3-alpine
161-
FROM python@sha256:603975e62d85aa07578034d3d10ffa1983b7618a6abb6371cf51941be6b8842c
163+
FROM python@sha256:$SHA256
162164

163165
# import from global
164166
ARG appdir

0 commit comments

Comments
 (0)