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