summaryrefslogtreecommitdiff
path: root/vendor/gitlab-ci-yml/Docker.gitlab-ci.yml
blob: 8c5905799346c7d03cf1f27093fb38ef579f6e9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Official docker image.
image: docker:latest

services:
  - docker:dind

build:
  stage: build
  script:
    - export IMAGE_TAG=$(echo -en $CI_BUILD_REF_NAME | tr -c '[:alnum:]_.-' '-')
    - docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
    - docker build --pull -t "$CI_REGISTRY_IMAGE:$IMAGE_TAG" .
    - docker push "$CI_REGISTRY_IMAGE:$IMAGE_TAG"