diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-04-17 15:30:49 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2019-04-17 15:30:49 +0300 |
commit | dc26124aa3366f141f0be06c56122a2b0357b782 (patch) | |
tree | b6a6fb7f906cfd52d253062483cd1cb2b1e17a54 | |
parent | 5a8fa8ebd73090e7b4488639b051cbf8b476d617 (diff) |
-rw-r--r-- | Dockerfile | 17 | ||||
-rw-r--r-- | bot/bot.go (renamed from bot.go) | 0 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ceffaa6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM golang:1.12 as builder + +ARG MODE=bot +ARG PROXY= +WORKDIR /usr/src +COPY go.mod go.mod +COPY go.sum go.sum +RUN GOPROXY=${PROXY} go mod download +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o transport ./${MODE} + +FROM alpine:latest + +RUN apk update && apk add --no-cache --virtual ca-certificates +WORKDIR /usr/app +COPY --from=builder /usr/src/transport . +CMD ["./transport"] |