From c481fdfbabaef6e87a5bfe0ac34de4cc77c768b9 Mon Sep 17 00:00:00 2001 From: Medya GhaziZadeh Date: Wed, 18 Oct 2017 15:44:14 -0500 Subject: [PATCH] reverting multistage because minikube uses old docker version --- Dockerfile | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4854e5c..dd313a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,27 @@ -FROM varikin/golang-glide-alpine AS build -WORKDIR /go/src/github.com/k8guard/k8guard-discover -COPY ./ ./ -RUN apk -U add make -RUN make deps build - FROM alpine -RUN apk -U add ca-certificates -COPY --from=build /go/src/github.com/k8guard/k8guard-discover/k8guard-discover / +ADD k8guard-discover / EXPOSE 3000 ENTRYPOINT ["/k8guard-discover"] + + +# Commmenting out the multistage build +# Unfortunately I have to revert multistage dockerfile with a lot of saddness +# because minikube uses a very old version of docker in the virtual machine they provide +# and that breaks buidling k8guard for minikube locally, +# altenrative solution would have been providing two dockerfiles one for docker-compose one for minikube +# for the sake of unity, I compromise for not using multistage dockerfile for now. +# with a lot of saddness. :( +# https://github.com/k8guard/k8guard-start-from-here/issues/50 + + +# FROM varikin/golang-glide-alpine AS build +# WORKDIR /go/src/github.com/k8guard/k8guard-discover +# COPY ./ ./ +# RUN apk -U add make +# RUN make deps build +# +# FROM alpine +# RUN apk -U add ca-certificates +# COPY --from=build /go/src/github.com/k8guard/k8guard-discover/k8guard-discover / +# EXPOSE 3000 +# ENTRYPOINT ["/k8guard-discover"]