From 19dd244f221efed4beeba0f9f6947467ab7e5068 Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Tue, 6 Nov 2018 13:02:44 +0100 Subject: [PATCH] Adding generated dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6c6c7b0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM library/golang + +# Godep for vendoring +RUN go get github.com/tools/godep + +# Recompile the standard library without CGO +RUN CGO_ENABLED=0 go install -a std + +ENV APP_DIR $GOPATH/src/multitenantStack +RUN mkdir -p $APP_DIR + +# Set the entrypoint +ENTRYPOINT (cd $APP_DIR && ./multitenantStack) +ADD . $APP_DIR + +# Compile the binary and statically link +RUN cd $APP_DIR && CGO_ENABLED=0 godep go build -ldflags '-d -w -s' + +EXPOSE 8080