add dockerfile

This commit is contained in:
2022-05-28 17:29:10 +03:00
parent 286e034985
commit 5a5a7c4df9
2 changed files with 20 additions and 0 deletions

12
Dockerfile Normal file
View File

@@ -0,0 +1,12 @@
FROM golang:1.18-alpine as builder
RUN apk add --no-cache gcc musl-dev
RUN mkdir -p /build
COPY . /build
WORKDIR /build
RUN go build -a -o bot
FROM alpine:3.16
COPY --from=builder /build/bot /app/bot
WORKDIR /app
RUN mkdir -p /app/data
ENTRYPOINT ["./bot"]