Update .gitlab-ci.yml to push images to the gitlab registry instead of docker.io
This commit is contained in:
parent
f81b6460d1
commit
666dc76ee4
1 changed files with 7 additions and 4 deletions
|
|
@ -31,11 +31,14 @@ build:
|
|||
|
||||
dockerize:
|
||||
stage: build
|
||||
variables:
|
||||
IMAGE: $CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA
|
||||
before_script:
|
||||
- docker info
|
||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||
script:
|
||||
- docker build . -t $DOCKER_REPO:$CI_COMMIT_REF_NAME
|
||||
- docker login -u $DOCKER_USER -p $DOCKER_PASS
|
||||
- docker push $DOCKER_REPO:$CI_COMMIT_REF_NAME
|
||||
- docker logout
|
||||
- docker build -t $IMAGE .
|
||||
- docker push $IMAGE
|
||||
tags:
|
||||
- builder
|
||||
when: manual
|
||||
|
|
|
|||
Loading…
Reference in a new issue