diff options
Diffstat (limited to 'telebot/Dockerfile')
-rw-r--r-- | telebot/Dockerfile | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/telebot/Dockerfile b/telebot/Dockerfile index 0a9e3e2..894b02e 100644 --- a/telebot/Dockerfile +++ b/telebot/Dockerfile @@ -1,18 +1,13 @@ FROM alpine:3.13 as builder RUN apk update && apk upgrade RUN apk add go git -COPY go.* /hived/ -RUN cd /hived && go mod download -COPY *.go /hived/ -RUN cd /hived && go build - -FROM node:lts-alpine3.13 AS certbuilder -RUN apk add openssl -WORKDIR /certs -RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=localhost" -keyout server.key -out server.cert +COPY go.* /telebot/ +RUN cd /telebot && go mod download +COPY *.go /telebot/ +RUN cd /telebot && go build FROM gcr.io/distroless/static-debian10 COPY --from=certbuilder /cert/ /cert/ -COPY --from=builder /hived/hived /hived/ -COPY ./docker-entrypoint.sh /hived/ -ENTRYPOINT ["/hived/docker-entrypoint.sh"] +COPY --from=builder /telebot/telebot /telebot/ +COPY ./docker-entrypoint.sh /telebot/ +ENTRYPOINT ["/telebot/docker-entrypoint.sh"] |