diff --git a/.circleci/config.yml b/.circleci/config.yml index e90821f0..8532168b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,9 +53,9 @@ jobs: name: build docker images and push them to dockerhub command: | docker login -u $DOCKER_USER -p $DOCKER_PASS - docker build -t praqma/helmsman:$CIRCLE_TAG-helm-v2.16.7 --build-arg HELM_VERSION=v2.16.7 --build-arg HELM_DIFF_VERSION=master dockerfile/. --no-cache + docker build -t praqma/helmsman:$CIRCLE_TAG-helm-v2.16.7 --build-arg HELM_VERSION=v2.16.7 --build-arg HELM_DIFF_VERSION=master -f dockerfile/dockerfile --no-cache . docker push praqma/helmsman:$CIRCLE_TAG-helm-v2.16.7 - docker build -t praqma/helmsman:$CIRCLE_TAG-helm-v2.15.2 --build-arg HELM_VERSION=v2.15.2 --build-arg HELM_DIFF_VERSION=master dockerfile/. --no-cache + docker build -t praqma/helmsman:$CIRCLE_TAG-helm-v2.15.2 --build-arg HELM_VERSION=v2.15.2 --build-arg HELM_DIFF_VERSION=master -f dockerfile/dockerfile --no-cache . docker push praqma/helmsman:$CIRCLE_TAG-helm-v2.15.2 - run: diff --git a/dockerfile/dockerfile b/dockerfile/dockerfile index c1abc71f..eba12731 100644 --- a/dockerfile/dockerfile +++ b/dockerfile/dockerfile @@ -6,11 +6,12 @@ FROM golang:${GO_VERSION}-alpine3.10 as builder WORKDIR /go/src/ RUN apk --no-cache add make git dep -RUN git clone https://github.com/Praqma/helmsman.git +COPY . helmsman/ + +WORKDIR /go/src/helmsman # build a statically linked binary so that it works on stripped linux images such as alpine/busybox. -RUN cd helmsman \ - && LastTag=$(git describe --abbrev=0 --tags) \ +RUN LastTag=$(git describe --abbrev=0 --tags) \ && TAG=$LastTag-$(date +"%d%m%y") \ && LT_SHA=$(git rev-parse ${LastTag}^{}) \ && LC_SHA=$(git rev-parse HEAD) \