dockerfile with swagger integration

This commit is contained in:
ycc
2023-10-18 15:24:57 +02:00
parent 3a076bbf78
commit 1b450c08a2
3 changed files with 21 additions and 4 deletions

View File

@@ -6,6 +6,12 @@ COPY . .
RUN apk add git
RUN go get github.com/beego/bee/v2 && go install github.com/beego/bee/v2@master
RUN timeout 15 bee run -gendoc=true -downdoc=true -runmode=dev || :
RUN sed -i 's/http:\/\/127.0.0.1:8080\/swagger\/swagger.json/swagger.json/g' swagger/index.html
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" .
RUN ls /app
@@ -15,6 +21,7 @@ FROM scratch
WORKDIR /app
COPY --from=builder /app/oc-discovery /usr/bin/
COPY --from=builder /app/swagger /app/swagger
COPY peers.json /app/
COPY identity.json /app/
COPY docker_discovery.json /etc/oc/discovery.json