Skip to content

Commit

Permalink
Don't use cache when building official Docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
tmaczukin committed Oct 29, 2018
1 parent d31a4dc commit 9281bef
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions ci/release_docker_images
Expand Up @@ -25,7 +25,7 @@ _docker() {
build() {
echo -e "\033[1mBuilding image: \033[32m${1}\033[0m"
_docker build \
--cache-from "${3}" \
--no-cache \
--build-arg DOCKER_MACHINE_VERSION="${DOCKER_MACHINE_VERSION}" \
--build-arg DUMB_INIT_VERSION="${DUMB_INIT_VERSION}" \
-t "${1}" \
Expand All @@ -50,11 +50,6 @@ tag_latest() {
tag "${@}"
}

pull() {
echo -e "\033[1mPulling image: \033[32m${1}\033[0m"
_docker pull "${1}"
}

push() {
echo -e "\033[1mPushing image: \033[32m${1}\033[0m"
_docker push "${1}"
Expand Down Expand Up @@ -105,11 +100,8 @@ cp dockerfiles/checksums dockerfiles/ubuntu
cp out/binaries/gitlab-runner-linux-amd64 dockerfiles/alpine
cp dockerfiles/checksums dockerfiles/alpine

pull gitlab/gitlab-runner:ubuntu
pull gitlab/gitlab-runner:alpine

build "gitlab/gitlab-runner:ubuntu-${ref_tag}" dockerfiles/ubuntu gitlab/gitlab-runner:ubuntu
build "gitlab/gitlab-runner:alpine-${ref_tag}" dockerfiles/alpine gitlab/gitlab-runner:alpine
build "gitlab/gitlab-runner:ubuntu-${ref_tag}" dockerfiles/ubuntu
build "gitlab/gitlab-runner:alpine-${ref_tag}" dockerfiles/alpine

tag "gitlab/gitlab-runner:ubuntu-${ref_tag}" "gitlab/gitlab-runner:${ref_tag}"

Expand Down

0 comments on commit 9281bef

Please sign in to comment.