瀏覽代碼

Add Dockerfile

poesty 1 年之前
當前提交
c039cc8a0a
共有 1 個文件被更改,包括 19 次插入0 次删除
  1. 19 0
      Dockerfile

+ 19 - 0
Dockerfile

@@ -0,0 +1,19 @@
+FROM golang:1.13-alpine as build
+
+WORKDIR /app
+
+COPY . .
+
+ENV CGO_ENABLED=0
+
+RUN go build -mod=vendor -o bloat
+
+FROM scratch
+
+COPY --from=build /app/bloat /bloat
+COPY templates /templates
+COPY static /static
+
+EXPOSE 8080
+
+CMD ["/bloat"]