Created
April 14, 2020 09:11
-
-
Save kittinan/761ff556c1b09f7d8cad3596b239c181 to your computer and use it in GitHub Desktop.
Gitlab CI build docker image https://forum.gitlab.com/t/push-docker-image-to-gitlab-registry-from-gitlab-ci/16288/3
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 | |
- deploy | |
build: | |
stage: build | |
when: on_success | |
only: | |
- master | |
image: docker:stable | |
services: | |
- docker:dind | |
script: | |
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY | |
- docker build -t $CI_REGISTRY/hytta-iot/hytta.io . | |
- docker push $CI_REGISTRY/hytta-iot/hytta.io |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment