aboutsummaryrefslogtreecommitdiffstats
path: root/arbiter/Dockerfile
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-07-07 12:01:38 +0000
committerterminaldweller <thabogre@gmail.com>2022-07-07 12:01:38 +0000
commit7a0c2fc36d2d9a6b716e6418d3f37fe2f69b066c (patch)
tree2a039bd2000d68e88b6e60b0da4969a58043bae2 /arbiter/Dockerfile
parentadded goproxy env var to the docker images (diff)
downloadhived-7a0c2fc36d2d9a6b716e6418d3f37fe2f69b066c.tar.gz
hived-7a0c2fc36d2d9a6b716e6418d3f37fe2f69b066c.zip
skeleton
Diffstat (limited to 'arbiter/Dockerfile')
-rw-r--r--arbiter/Dockerfile20
1 files changed, 20 insertions, 0 deletions
diff --git a/arbiter/Dockerfile b/arbiter/Dockerfile
new file mode 100644
index 0000000..fe3fb31
--- /dev/null
+++ b/arbiter/Dockerfile
@@ -0,0 +1,20 @@
+FROM alpine:3.13 as builder
+ENV GOPROXY=https://goproxy.io
+RUN apk update && apk upgrade
+RUN apk add go git
+ENV GOPROXY=https://goproxy.io
+COPY go.* /arbiter/
+RUN cd /arbiter && go mod download
+COPY *.go /arbiter/
+RUN cd /arbiter && go build
+
+FROM alpine:3.15 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 /arbiter/arbiter /arbiter/
+ENTRYPOINT ["/arbiter/arbiter"]