From 14e5510081e39703fcbd4b9bb6e4b1add2ba1cbd Mon Sep 17 00:00:00 2001 From: structix Date: Sun, 11 Oct 2020 11:54:17 +0200 Subject: [PATCH] Add Dockerfile --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0386c1d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.14.0-alpine3.11 + +# Add Maintainer Info +LABEL maintainer="structix " + +RUN mkdir /trikotwaschliste && apk add git bash +WORKDIR /trikotwaschliste +COPY . . + +# Install all the dependencies and build +# Use the online repositories to build the goapi: +RUN go get -d -v ./... && go install -v ./... && go build -tags=jsoniter -o trikotwaschliste +# +# Use the vendor folder: +#RUN go build -mod vendor -tags=jsoniter -o trikotwaschliste + +ENV GIN_MODE=release +ENV LOG=* +EXPOSE 8082 + + +# Run the executable +CMD ["./trikotwaschliste"]