Docker building and various fixes around the code.

This commit is contained in:
2019-10-16 21:05:54 +05:00
parent 9893315796
commit db34a064f5
7 changed files with 103 additions and 34 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM golang:1.13.1-alpine AS build
WORKDIR /discordrone
COPY . .
RUN CGO_ENABLED=0 go build -tags netgo -ldflags '-w -extldflags "-static"'
FROM alpine:3.10
LABEL maintainer "Stanislav N. <pztrn@pztrn.name>"
COPY --from=build /discordrone/discordrone /app/discordrone
RUN apk add --no-cache ca-certificates
ENTRYPOINT [ "/app/discordrone" ]