normalize line endings
This commit is contained in:
parent
6d8120a757
commit
08da856351
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
* text=auto
|
11
Dockerfile
11
Dockerfile
@ -1,20 +1,27 @@
|
|||||||
FROM golang:latest as builder
|
FROM golang:latest as builder
|
||||||
|
LABEL maintainer="Johannes Theiner <kontakt@joethei.xyz>"
|
||||||
|
|
||||||
COPY . /
|
COPY . /
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
|
ENV CGO_ENABLED=0
|
||||||
|
ENV GOOS=linux
|
||||||
|
ENV GOARCH=amd64
|
||||||
|
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN cd server
|
RUN cd server
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
RUN cd ..
|
RUN cd ..
|
||||||
|
|
||||||
RUN go build
|
RUN go build -a -tags netgo -ldflags '-w' .
|
||||||
|
RUN ls -la
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY --from=builder /src/weather .
|
COPY --from=builder /src/weather .
|
||||||
|
RUN ls -la
|
||||||
|
RUN chmod +x ./weather
|
||||||
|
|
||||||
CMD ["./weather"]
|
ENTRYPOINT ["/weather"]
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
Loading…
Reference in New Issue
Block a user