From 08da8563511a142cf652c14896985c392c09838d Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Tue, 21 Jul 2020 12:52:34 +0200 Subject: [PATCH] normalize line endings --- .gitattributes | 1 + Dockerfile | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2125666 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 28b45af..e3bd700 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,27 @@ FROM golang:latest as builder +LABEL maintainer="Johannes Theiner " COPY . / WORKDIR /src ENV GO111MODULE=on +ENV CGO_ENABLED=0 +ENV GOOS=linux +ENV GOARCH=amd64 RUN go mod download RUN cd server RUN go mod download RUN cd .. -RUN go build +RUN go build -a -tags netgo -ldflags '-w' . +RUN ls -la FROM alpine:latest WORKDIR / COPY --from=builder /src/weather . +RUN ls -la +RUN chmod +x ./weather -CMD ["./weather"] +ENTRYPOINT ["/weather"] EXPOSE 8080