add Containerfile
This commit is contained in:
parent
fa2b8ecd77
commit
d032783f5e
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
.git
|
22
Containerfile
Normal file
22
Containerfile
Normal file
@ -0,0 +1,22 @@
|
||||
# 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 :
|
Loading…
Reference in New Issue
Block a user