Skip to content

Commit

Permalink
build: update python:3-alpine version
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rouilj committed Sep 24, 2023
1 parent 275a30f commit abf50e6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# docker run --rm -v /.../issue.tracker:/usr/src/app/tracker \
# -p 9017:8080 roundup-app:latest

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

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

#FROM python:3-alpine
FROM python@sha256:603975e62d85aa07578034d3d10ffa1983b7618a6abb6371cf51941be6b8842c as build
#FROM python:3-alpine via SHA256 sum
FROM python@sha256:$SHA256 as build

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

# import from global
ARG appdir
Expand Down

0 comments on commit abf50e6

Please sign in to comment.