Last active
October 28, 2020 08:21
-
-
Save esys/f8cf91e12adf88a96e1b2afce56529b7 to your computer and use it in GitHub Desktop.
This file contains 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: "" | |
# localhost address is shared by both the job container and the dind container (as they share the same Pod) | |
# So this configuration make the dind service as our Docker daemon when running Docker commands | |
DOCKER_HOST: "tcp://localhost:2375" | |
services: | |
- docker:stable-dind | |
docker-build: | |
image: docker:stable | |
stage: build | |
script: | |
- docker build -t hello . | |
- docker tag 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