aboutsummaryrefslogtreecommitdiffstats
path: root/telebot/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'telebot/Dockerfile')
-rw-r--r--telebot/Dockerfile19
1 files changed, 19 insertions, 0 deletions
diff --git a/telebot/Dockerfile b/telebot/Dockerfile
new file mode 100644
index 0000000..8259880
--- /dev/null
+++ b/telebot/Dockerfile
@@ -0,0 +1,19 @@
+FROM alpine:3.13 as builder
+RUN apk update && apk upgrade
+RUN apk add go git
+COPY go.* /telebot/
+RUN cd /telebot && go mod download
+COPY *.go /telebot/
+RUN cd /telebot && 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
+
+# FROM gcr.io/distroless/static-debian10
+FROM alpine:3.13
+COPY --from=certbuilder /certs /certs
+COPY --from=builder /telebot/telebot /telebot/
+COPY ./docker-entrypoint.sh /telebot/
+ENTRYPOINT ["/telebot/docker-entrypoint.sh"]