Stephen McQuay (smcquay)
04e200eb54
follows along here loosely: https://docs.docker.com/develop/develop-images/multistage-build/ https://blog.alexellis.io/mutli-stage-docker-builds/
14 lines
307 B
Docker
14 lines
307 B
Docker
FROM golang:1.10.1 as build
|
|
WORKDIR /go/src/mcquay.me/lim
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/lim .
|
|
|
|
FROM alpine:latest
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
WORKDIR /
|
|
|
|
COPY --from=build /usr/local/bin/lim /bin/
|
|
|
|
CMD ["/bin/sh", "-c", "cat /dev/urandom | /bin/lim 16b | xxd"]
|