aboutsummaryrefslogblamecommitdiffstats
path: root/arbiter/Dockerfile
blob: 8901c8ad5c885a2731ab1245eb4f7d2be6f23d9d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                           








                                  
                               




                                                                                                                              
                


                                              
FROM alpine:3.18 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.18 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.18
COPY --from=certbuilder /certs /certs
COPY --from=builder /arbiter/arbiter /arbiter/
ENTRYPOINT ["/arbiter/arbiter"]