Create final Docker image using Alpine Linux to keep things smol

pull/6/head
pocketjawa 2019-07-29 21:36:27 -04:00
parent 49ba0695e0
commit 7833cccfb9
1 changed files with 6 additions and 4 deletions

View File

@ -1,9 +1,11 @@
FROM golang:latest FROM golang:latest AS build
WORKDIR /go/src/buttsbot WORKDIR /go/src/buttsbot
COPY . . COPY . .
RUN go get -d -v ./... RUN go get -d -v ./...
RUN go install -v ./... RUN go install -v ./...
CMD ["buttsbot"] FROM alpine:latest
run apk add --no-cache bash
WORKDIR /app
COPY --from=build /go/bin/buttsbot discord-buttsbot
CMD ./discord-buttsbot