grim/tagpull
Clone
Summary
Browse
Changes
Graph
Add a dockerfile
draft
2020-07-05, Gary Kramlich
c65b5da80482
Parents
4f65422a6fcb
Children
63744ee1e1d8
Add a dockerfile
1 files changed, 18 insertions(+), 0 deletions(-)
+18
-0
Dockerfile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Dockerfile Sun Jul 05 05:27:49 2020 -0500
@@ -0,0 +1,18 @@
+FROM golang:1.14 AS build
+
+RUN set -ex && \
+ apt-get update && \
+ apt-get install -y --no-install-recommends ca-certificates
+
+COPY . /tagpull
+
+WORKDIR /tagpull
+
+RUN CGO_ENABLED=0 go build -ldflags '-w -extldflags "-static"'
+
+FROM scratch
+
+COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
+COPY --from=build /tagpull/tagops /tagpull
+
+CMD ["/tagpull"]