diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-12-13 16:08:21 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-12-13 16:08:21 +0300 |
commit | e0db43db0131ffa82465c9d38bf0d615ba8afb5b (patch) | |
tree | 9a7ad2956e10f417a3c93e18b485eec004747ebf /Dockerfile | |
parent | c178d644f6818ba32889d6223d3a1bb33e2a19c7 (diff) |
Added docker
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7b58a30 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM golang:1.17-alpine as builder +WORKDIR /usr/src +COPY go.mod . +COPY go.sum . +RUN GOPROXY=${PROXY} go mod download +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o pomodoro . + +FROM alpine +WORKDIR /usr/app +COPY --from=builder /usr/src/pomodoro . +CMD ["./pomodoro"]
\ No newline at end of file |