aboutsummaryrefslogtreecommitdiffstats
path: root/telebot/Dockerfile
diff options
context:
space:
mode:
authorFarzad Sadeghi <thabogre@gmail.com>2021-12-14 17:25:09 +0000
committerGitHub <noreply@github.com>2021-12-14 17:25:09 +0000
commit5290f1f5ef81e776ca59f08e7fbf58c02e647288 (patch)
treef07b88aab5f13975e327376f1e9e16f59cdf6144 /telebot/Dockerfile
parentadded a codacy badge (diff)
parentfixed the ip and address for the grpc server (diff)
downloadhived-5290f1f5ef81e776ca59f08e7fbf58c02e647288.tar.gz
hived-5290f1f5ef81e776ca59f08e7fbf58c02e647288.zip
Merge pull request #4 from terminaldweller/grpc
Grpc
Diffstat (limited to '')
-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"]