mirror of
https://github.com/hamburghammer/gsave.git
synced 2024-12-22 02:27:39 +01:00
efb9d7aace
It reduces the image by >100MB.
17 lines
No EOL
229 B
Docker
17 lines
No EOL
229 B
Docker
FROM golang AS build
|
|
COPY ./go.* /src/
|
|
WORKDIR /src
|
|
RUN go mod download
|
|
|
|
COPY . /src
|
|
|
|
ENV CGO_ENABLED=0
|
|
RUN go build -o /gsave
|
|
|
|
|
|
FROM alpine
|
|
COPY --from=build /gsave /usr/bin/
|
|
|
|
ENTRYPOINT [ "gsave" ]
|
|
CMD [ "--quiet" ]
|
|
EXPOSE 8080 |