19 lines
445 B
Docker
19 lines
445 B
Docker
FROM golang:1.16 as builder
|
|
|
|
WORKDIR /root/go/src/github.com/barnacs/compy/
|
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install git g++ libjpeg-dev
|
|
|
|
COPY . .
|
|
|
|
RUN go get -d -v ./...
|
|
RUN go build -ldflags='-extldflags "-static" -s -w' -o /go/bin/compy
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /go/bin/compy compy
|
|
|
|
ENTRYPOINT ["./compy"]
|