Initial version, empty shell

This commit is contained in:
ycc
2024-07-11 11:40:11 +02:00
parent 9d4b051821
commit 32fcbb7ffe
33 changed files with 1082 additions and 2 deletions

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM golang:alpine as builder
WORKDIR /app
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
FROM scratch
WORKDIR /app
COPY --from=builder /app/oc-workflow /usr/bin/
COPY --from=builder /app/swagger /app/swagger
COPY docker_workflow.json /etc/oc/workflow.json
EXPOSE 8080
ENTRYPOINT ["oc-workflow"]