gitlab-org--gitlab-foss/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml

14 lines
374 B
YAML
Raw Normal View History

2016-06-16 04:39:17 -04:00
# Official docker image.
image: docker:latest
2016-09-01 19:20:40 -04:00
services:
- docker:dind
2016-06-16 04:39:17 -04:00
build:
stage: build
script:
2017-01-09 09:24:25 -05:00
- export IMAGE_TAG=$(echo -en $CI_BUILD_REF_NAME | tr -c '[:alnum:]_.-' '-')
2016-09-01 19:20:40 -04:00
- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
2017-01-09 09:24:25 -05:00
- docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
- docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"