Add docker service
This commit is contained in:
parent
9ef61b19bb
commit
f3fa7155a7
2 changed files with 8 additions and 5 deletions
|
@ -79,9 +79,12 @@ build_image:
|
||||||
tags:
|
tags:
|
||||||
- dind
|
- dind
|
||||||
image: "docker:latest"
|
image: "docker:latest"
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
script:
|
script:
|
||||||
|
- cd $CI_PROJECT_DIR
|
||||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
- docker build -t $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v} .
|
- docker build -t $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v} .
|
||||||
- docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v}
|
- docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v}
|
||||||
only:
|
# only:
|
||||||
- tags
|
# - tags
|
|
@ -3,10 +3,10 @@ FROM golang:1.9
|
||||||
WORKDIR /go/src/git.klink.asia/paul/certman
|
WORKDIR /go/src/git.klink.asia/paul/certman
|
||||||
ADD . .
|
ADD . .
|
||||||
RUN \
|
RUN \
|
||||||
|
go get -tags="dev" -v git.klink.asia/paul/certman && \
|
||||||
go get github.com/shurcooL/vfsgen/cmd/vfsgendev && \
|
go get github.com/shurcooL/vfsgen/cmd/vfsgendev && \
|
||||||
go generate git.klink.asia/paul/certman/assets && \
|
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
|
FROM scratch
|
||||||
ENV \
|
ENV \
|
||||||
|
|
Loading…
Reference in a new issue