Files

19 lines
445 B
Docker
Raw Permalink Normal View History

2022-03-26 15:49:33 +02:00
FROM golang:1.16 as builder
2018-02-01 08:48:59 -08:00
2019-05-24 11:24:07 +02:00
WORKDIR /root/go/src/github.com/barnacs/compy/
2018-02-01 08:48:59 -08:00
2022-03-26 15:49:33 +02:00
RUN DEBIAN_FRONTEND=noninteractive apt update && \
DEBIAN_FRONTEND=noninteractive apt install git g++ libjpeg-dev
2019-05-24 11:24:07 +02:00
COPY . .
2018-02-01 08:48:59 -08:00
2019-05-24 11:24:07 +02:00
RUN go get -d -v ./...
RUN go build -ldflags='-extldflags "-static" -s -w' -o /go/bin/compy
2018-02-01 08:48:59 -08:00
2019-05-24 11:24:07 +02:00
FROM scratch
2017-08-25 17:53:06 -07:00
2019-05-24 11:24:07 +02:00
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/bin/compy compy
2017-08-25 17:53:06 -07:00
2019-05-24 11:24:07 +02:00
ENTRYPOINT ["./compy"]