grim/cerestial
Clone
Summary
Browse
Changes
Graph
Add a Dockerfile and .dockerignore file
18 months ago, Gary Kramlich
06d4d14f0ce9
Parents
4cca2f719ba8
Children
de99bd618e5a
Add a Dockerfile and .dockerignore file
2 files changed, 15 insertions(+), 0 deletions(-)
+2
-0
.dockerignore
+13
-0
Dockerfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.dockerignore Thu Dec 08 02:30:50 2022 -0600
@@ -0,0 +1,2 @@
+.hg
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile Thu Dec 08 02:30:50 2022 -0600
@@ -0,0 +1,13 @@
+FROM docker.io/golang:1.19-bullseye as build
+
+WORKDIR /root
+
+COPY . .
+
+RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static" -s' .
+
+FROM scratch
+
+COPY --from=build /root/cerestial /cerestial
+
+CMD ["/cerestial"]