mfer/Dockerfile
sneak bd4b135e17
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
test me pls
2022-12-04 22:55:22 +04:00

30 lines
552 B
Docker

## lint image
FROM golangci/golangci-lint:v1.50.1
RUN mkdir -p /build
WORKDIR /build
COPY ./ ./
RUN golangci-lint run
## build image:
FROM sneak/mfer-build AS builder
WORKDIR /build
COPY go.mod .
COPY go.sum .
COPY ./ ./
# don't lint again during build because there's no golangci-lint in this
# image and we already did it in a previous stage
#RUN make lint
RUN make mfer.cmd
#RUN go mod vendor
RUN tar -c . | bzip2 > /src.tbz2
FROM scratch
COPY --from=builder /src.tbz2 /src.tbz2
COPY --from=builder /build/mfer.cmd /mfer
ENTRYPOINT ["/mfer"]