This repository has been archived on 2022-08-18. You can view files and clone it, but cannot push or open issues or pull requests.
rageshake/Dockerfile
Manuel Stahl a602d31206 Add Dockerfile
Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
2019-08-29 09:07:08 +02:00

18 lines
467 B
Docker

FROM golang:alpine as builder
RUN apk add --update --no-cache git ca-certificates
RUN mkdir /build
WORKDIR /build
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o rageshake
FROM scratch
COPY --from=builder /build/rageshake /rageshake
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
WORKDIR /
EXPOSE 9110
CMD ["/rageshake"]