Skip to content

Instantly share code, notes, and snippets.

@esys
Last active October 28, 2020 08:21
Show Gist options
  • Save esys/50899683ca886e2cf216be9bd8367c06 to your computer and use it in GitHub Desktop.
Save esys/50899683ca886e2cf216be9bd8367c06 to your computer and use it in GitHub Desktop.
gitlab pipeline with external docker dind
stages:
- build
- test
- deploy
variables:
# disable Docker TLS validation
DOCKER_TLS_CERTDIR: ""
# here the dind hostname is resolved as the Kubernetes dind service by the kube dns
DOCKER_HOST: "tcp://dind:2375"
docker-build:
image: docker:stable
stage: build
script:
- docker build -t hello .
- docker tag hello:latest my-registry/hello:{CI_COMMIT_SHORT_SHA}
- docker push my-registry/hello:{CI_COMMIT_SHORT_SHA}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment