Browse Source

Add Dockerfile

poesty 1 year ago
commit
c039cc8a0a
1 changed files with 19 additions and 0 deletions
  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"]