-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
28 lines (25 loc) · 771 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# This file is a template, and might need editing before it works on your project.
# Official docker image.
services:
- docker:dind
stages:
- build
variables:
CI_REGISTRY: "docker.io"
CI_REGISTRY_IMAGE: "docker.io/beardedio/docker-proxy"
CI_REGISTRY_USER: "bskrtich"
CI_REGISTRY_PASSWORD: "set-as-secret-variable"
build:
image: docker:latest
variables:
DOCKER_TAG: "latest"
DOCKER_FILE: "Dockerfile"
stage: build
only:
- master
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull --tag "$CI_REGISTRY_IMAGE" --file "$DOCKER_FILE" .
- docker tag "$CI_REGISTRY_IMAGE" "$CI_REGISTRY_IMAGE:$DOCKER_TAG"
- docker push "$CI_REGISTRY_IMAGE:$DOCKER_TAG"