From f3fa7155a708f80b97e36aea99ad5931ea3ec32e Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 3 Feb 2018 18:34:56 +0100 Subject: [PATCH] Add docker service --- .gitlab-ci.yml | 9 ++++++--- Dockerfile | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 329cbf6..17f665b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -79,9 +79,12 @@ build_image: tags: - dind image: "docker:latest" - script: + 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 \ No newline at end of file +# only: +# - tags \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index db83d30..18db985 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \