Skip to content
Snippets Groups Projects

Use docker-image-builder instead of custom installing docker each time.

Merged MJDSys requested to merge 1-produce-and-use-a-docker-image-builder-docker-container into master
1 file
+ 2
10
Compare changes
  • Side-by-side
  • Inline
+ 2
10
# Official docker image.
image: docker.mjdsystems.ca/docker/debian:latest
image: docker.mjdsystems.ca/docker/docker-image-builder:latest
services:
- docker:dind
@@ -12,10 +12,7 @@ build:
stage: build
script:
- apt-get update
- apt-get install -y apt-transport-https ca-certificates curl software-properties-common debootstrap
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian jessie stable"
- apt-get update && apt-get install -y docker-ce
- apt-get install -y debootstrap
- export IMAGE_TAG=$(echo -en $CI_BUILD_REF_NAME | tr -c '[:alnum:]_.-' '-')
- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
- ./generate-rootfs
@@ -25,11 +22,6 @@ build:
deploy to latest tag:
stage: deploy
script:
- apt-get update
- apt-get install -y apt-transport-https ca-certificates curl software-properties-common debootstrap
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian jessie stable"
- apt-get update && apt-get install -y docker-ce
- export IMAGE_TAG=$(echo -en $CI_BUILD_REF_NAME | tr -c '[:alnum:]_.-' '-')
- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
- docker pull "$CI_REGISTRY_IMAGE:$IMAGE_TAG"
Loading