Last active
October 28, 2020 08:21
-
-
Save esys/50899683ca886e2cf216be9bd8367c06 to your computer and use it in GitHub Desktop.
gitlab pipeline with external docker dind
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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