diwt/Containerfile

23 lines
542 B
Plaintext
Raw Permalink Normal View History

2022-09-14 10:58:26 +02:00
# syntax=docker/dockerfile-upstream:master-labs
FROM docker.io/library/golang:1.19.1-alpine3.16 AS diwtbuild
WORKDIR /diwt
COPY . .
RUN CGO_ENABLED=0 GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" \
go build -v -ldflags '-s -w' .
FROM docker.io/library/alpine:3.16.2
ARG VCS_REF
COPY --from=diwtbuild /diwt/diwt /usr/bin/diwt
# have a default.
# this would, of course, require mounting a file to the following location.
CMD ["/usr/bin/diwt", "-m", "/matrix.txt"]
# vim: set ts=4 ft=dockerfile fenc=utf-8 ff=unix :