GitLab CI: build a docker image
This commit is contained in:
parent
47b0198e25
commit
06646a01df
1 changed files with 13 additions and 0 deletions
|
@ -142,3 +142,16 @@ pages:
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
docker:
|
||||||
|
image: docker:20.10.17
|
||||||
|
services:
|
||||||
|
- docker:20.10.17-dind
|
||||||
|
# https://medium.com/devops-with-valentine/how-to-build-a-docker-image-and-push-it-to-the-gitlab-container-registry-from-a-gitlab-ci-pipeline-acac0d1f26df
|
||||||
|
script:
|
||||||
|
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER $CI_REGISTRY --password-stdin
|
||||||
|
- docker build -t $CI_REGISTRY_IMAGE .
|
||||||
|
- docker push $CI_REGISTRY_IMAGE
|
||||||
|
# only:
|
||||||
|
# refs:
|
||||||
|
# - develop
|
Loading…
Reference in a new issue