From 0c8c603662d84974bfc681509694c27df404e7bf Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 12 Nov 2021 18:38:26 +0330 Subject: restructuring WIP --- telebot/Dockerfile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'telebot/Dockerfile') 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"] -- cgit v1.2.3