Skip to content

Commit

Permalink
Ensure hack/build-base-images.sh builds dind images
Browse files Browse the repository at this point in the history
Building the dind images as part of a ci job is a frequent source
of flakes caused by package installation failure via dnf.  This change
ensures the dind images are built by hack/build-base-images.sh so they
can be baked into the ami.
  • Loading branch information
marun committed Dec 13, 2016
1 parent dc5b60a commit adf8aaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions hack/build-base-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
# Build the base image without the default image args
OS_BUILD_IMAGE_ARGS="${OS_BUILD_IMAGE_BASE_ARGS-}" os::build::image "${OS_ROOT}/images/base" openshift/origin-base

# Build dind images to ensure they can be baked into the ami to
# reduce minimize the potential for dnf flakes in ci.
#
# Reference: https://github.com/openshift/origin/issues/11452
build openshift/dind "${OS_ROOT}/images/dind"
build openshift/dind-node "${OS_ROOT}/images/dind/node"
build openshift/dind-master "${OS_ROOT}/images/dind/master"

ret=$?; ENDTIME=$(date +%s); echo "$0 took $(($ENDTIME - $STARTTIME)) seconds"; exit "$ret"
3 changes: 2 additions & 1 deletion images/dind/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ RUN systemctl enable docker.service
RUN echo "DOCKER_STORAGE_OPTIONS=--storage-driver vfs" >\
/etc/sysconfig/docker-storage

COPY dind-setup.sh /usr/local/bin
RUN mkdir -p /usr/local/bin
COPY dind-setup.sh /usr/local/bin/
COPY dind-setup.service /etc/systemd/system/
RUN systemctl enable dind-setup.service

Expand Down

0 comments on commit adf8aaf

Please sign in to comment.