Skip to content

Commit ee0fb8a

Browse files
authored
Merge pull request sclorg#137 from omron93/allow-pull-base
Allow to pull base image during build
2 parents 2e46042 + 2458d60 commit ee0fb8a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

hack/build.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ function docker_build_with_version {
3636
cp ${DOCKERFILE_PATH} "${DOCKERFILE_PATH}.version"
3737
git_version=$(git rev-parse HEAD)
3838
echo "LABEL io.openshift.builder-version=\"${git_version}\"" >> "${dockerfile}.version"
39-
docker build -t ${IMAGE_NAME} -f "${dockerfile}.version" .
39+
if [[ "${UPDATE_BASE}" == "1" ]]; then
40+
BUILD_OPTIONS+=" --pull=true"
41+
fi
42+
docker build ${BUILD_OPTIONS} -t ${IMAGE_NAME} -f "${dockerfile}.version" .
4043
if [[ "${SKIP_SQUASH}" != "1" ]]; then
4144
squash "${dockerfile}.version"
4245
fi

hack/common.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ endif
1010

1111
script_env = \
1212
SKIP_SQUASH=$(SKIP_SQUASH) \
13+
UPDATE_BASE=$(UPDATE_BASE) \
1314
VERSIONS="$(VERSIONS)" \
1415
OS=$(OS) \
1516
VERSION=$(VERSION) \

0 commit comments

Comments
 (0)