Add docker service

This commit is contained in:
Paul 2018-02-03 18:34:56 +01:00
parent 9ef61b19bb
commit f3fa7155a7
2 changed files with 8 additions and 5 deletions

View file

@ -79,9 +79,12 @@ build_image:
tags:
- dind
image: "docker:latest"
services:
- docker:dind
script:
- cd $CI_PROJECT_DIR
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v} .
- docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v}
only:
- tags
# only:
# - tags

View file

@ -3,10 +3,10 @@ FROM golang:1.9
WORKDIR /go/src/git.klink.asia/paul/certman
ADD . .
RUN \
go get -tags="dev" -v git.klink.asia/paul/certman && \
go get github.com/shurcooL/vfsgen/cmd/vfsgendev && \
go generate git.klink.asia/paul/certman/assets && \
go get -v git.klink.asia/paul/certman && \
go build -tags netgo
go build -tags="netgo"
FROM scratch
ENV \