aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2021-11-12 08:13:02 +0000
committerterminaldweller <thabogre@gmail.com>2021-11-12 08:13:02 +0000
commit7f9f88650d22254dee9a840f208aa568f7a7bf19 (patch)
tree961e0366375c4c4dbb1d26c0be35be94d020ff87 /Dockerfile
parentchanges endpoints to crypto/ (diff)
downloadhived-7f9f88650d22254dee9a840f208aa568f7a7bf19.tar.gz
hived-7f9f88650d22254dee9a840f208aa568f7a7bf19.zip
added a dev and deployment docker-compose
Diffstat (limited to '')
-rw-r--r--Dockerfile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 1cb0683..0a9e3e2 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,4 @@
FROM alpine:3.13 as builder
-
RUN apk update && apk upgrade
RUN apk add go git
COPY go.* /hived/
@@ -7,7 +6,13 @@ 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
+COPY --from=certbuilder /cert/ /cert/
COPY --from=builder /hived/hived /hived/
COPY ./docker-entrypoint.sh /hived/
ENTRYPOINT ["/hived/docker-entrypoint.sh"]