Closed mcm closed 8 years ago
I'm closing this issue because I'm not sure what value it would add to the project - as it is something I would not personally use.
For anyone falling to this MR: If you want to make a tiny image by copying the binary, you have to add the following flags on go build
: CGO_ENABLED=0 GOOS=linux
Complete Dockerfile:
FROM golang:1-alpine3.11 as build
RUN apk add --no-cache git~=2
RUN git clone --branch 1.1.0 https://github.com/fcambus/rrda.git /build
WORKDIR /build
RUN CGO_ENABLED=0 GOOS=linux go build
FROM scratch
COPY --from=build /build/rrda /rrda
CMD ["/rrda", "-host", "0.0.0.0"]
Just sharing a Dockerfile that is working for us, using the Docker "trusted build" golang image. Usage: