aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2021-08-20 17:28:10 +0200
committerQuentin <quentin@deuxfleurs.fr>2021-08-20 17:28:10 +0200
commit1cc0de75a671f3b9496ba901abfddae32b316401 (patch)
treea3d2b1e50c56010cac3380a94a8ef54eab743aa6 /Dockerfile
parent36cef67f6ba8fddc93e025782059c7b0211fbfdf (diff)
downloadbagage-1cc0de75a671f3b9496ba901abfddae32b316401.tar.gz
bagage-1cc0de75a671f3b9496ba901abfddae32b316401.zip
Handle missing trailing slashes + Add Dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..451e459
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,12 @@
+FROM golang:1.17.0-alpine3.14 as builder
+ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
+RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
+WORKDIR /opt
+COPY main.go go.mod go.sum /opt/
+RUN go build .
+
+FROM scratch
+COPY --from=builder /opt/bagage /
+COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
+USER 1000:1000
+ENTRYPOINT ["/bagage"]