Add config & docker deployment

This commit is contained in:
ycc
2023-03-09 11:45:29 +01:00
parent 24fd211a43
commit acd9b1611c
7 changed files with 114 additions and 3 deletions

24
Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM golang:alpine as builder
WORKDIR /app
COPY . .
RUN apk add git
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" .
RUN ls /app
FROM scratch
WORKDIR /app
COPY --from=builder /app/oc-discovery /usr/bin/
COPY peers.json /app/
COPY identity.json /app/
COPY docker_discovery.json /etc/oc/discovery.json
EXPOSE 8080
ENTRYPOINT ["oc-discovery"]