chore: Update Dockerfile to reflect switch to go modules (#3652)

* chore: Update Dockerfile to reflect switch to go modules
This commit is contained in:
jannfis 2020-05-26 21:42:58 +02:00 committed by GitHub
parent 5ad46b025a
commit c914ea0218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,6 @@ WORKDIR /tmp
ADD hack/install.sh .
ADD hack/installers installers
RUN ./install.sh dep-linux
RUN ./install.sh packr-linux
RUN ./install.sh kubectl-linux
RUN ./install.sh ksonnet-linux
@ -99,21 +98,16 @@ RUN NODE_ENV='production' yarn build
####################################################################################################
FROM golang:1.14.1 as argocd-build
COPY --from=builder /usr/local/bin/dep /usr/local/bin/dep
COPY --from=builder /usr/local/bin/packr /usr/local/bin/packr
# A dummy directory is created under $GOPATH/src/dummy so we are able to use dep
# to install all the packages of our dep lock file
COPY Gopkg.toml ${GOPATH}/src/dummy/Gopkg.toml
COPY Gopkg.lock ${GOPATH}/src/dummy/Gopkg.lock
WORKDIR /go/src/github.com/argoproj/argo-cd
RUN cd ${GOPATH}/src/dummy && \
dep ensure -vendor-only && \
mv vendor/* ${GOPATH}/src/ && \
rmdir vendor
COPY go.mod go.mod
COPY go.sum go.sum
RUN go mod download
# Perform the build
WORKDIR /go/src/github.com/argoproj/argo-cd
COPY . .
RUN make cli server controller repo-server argocd-util && \
make CLI_NAME=argocd-darwin-amd64 GOOS=darwin cli && \