FROM golang:alpine AS builder WORKDIR $GOPATH/src/nethack-high-scores COPY . . RUN mkdir -p /dist # TODO: Ship with binary? COPY templates/ /dist/templates RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /dist/nhs FROM scratch COPY --from=builder /dist /dist EXPOSE 8080 VOLUME "/logfile" WORKDIR /dist CMD ["./nhs", "/nethack/logfile"]