Browse Source

Create initial Dockerfile

pocketjawa 1 year ago
parent
commit
4b011c983d
1 changed files with 11 additions and 0 deletions
  1. 11 0
      Dockerfile

+ 11 - 0
Dockerfile

@@ -0,0 +1,11 @@
+FROM golang:latest AS build
+WORKDIR /go/src/discord-pocketbot
+COPY . .
+RUN go get -d -v ./...
+RUN CGO_ENABLED=0 GOOS=linux go install -v ./...
+
+FROM alpine:latest
+run apk add --no-cache ca-certificates
+WORKDIR /app
+COPY --from=build /go/bin/discord-pocketbot discord-pocketbot
+CMD ./discord-pocketbot