From 5e89538adfeb9136cbca58a68bbc87661a1f1fc3 Mon Sep 17 00:00:00 2001
From: Tulir Asokan <tulir@maunium.net>
Date: Fri, 6 Jul 2018 15:51:50 +0300
Subject: [PATCH] Add dockerfile

---
 Dockerfile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 Dockerfile

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..cb09f30
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+FROM golang:1-alpine AS builder
+
+RUN apk add --no-cache git ca-certificates
+RUN wget -qO /usr/local/bin/dep https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
+RUN chmod +x /usr/local/bin/dep
+
+COPY Gopkg.lock Gopkg.toml /go/src/maubot.xyz/gitlab/
+WORKDIR /go/src/maubot.xyz/gitlab
+RUN dep ensure -vendor-only
+
+COPY . /go/src/maubot.xyx/gitlab
+RUN CGO_ENABLED=0 go build -o /usr/bin/maulabbot
+
+
+FROM scratch
+
+COPY --from=builder /usr/bin/maulabbot /usr/bin/maulabbot
+COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
+
+CMD ["/usr/bin/maulabbot"]
-- 
GitLab