light dockerfile

This commit is contained in:
pb 2024-02-15 11:56:25 +01:00
parent 30dfe68c16
commit e65b1a0199

View File

@ -9,14 +9,9 @@ RUN go get github.com/beego/bee/v2 && go install github.com/beego/bee/v2@master
# Generating the swagger # Generating the swagger
RUN timeout 20 bee run -gendoc=true -downdoc=true -runmode=dev || : RUN timeout 20 bee run -gendoc=true -downdoc=true -runmode=dev || :
RUN ls swagger/
RUN sed -i 's/http:\/\/127.0.0.1:8080\/swagger\/swagger.json/swagger.json/g' swagger/index.html RUN sed -i 's/http:\/\/127.0.0.1:8080\/swagger\/swagger.json/swagger.json/g' swagger/index.html
RUN sed -i 's/https:\/\/petstore.swagger.io\/v2\/swagger.json/swagger.json/g' swagger/index.html RUN sed -i 's/https:\/\/petstore.swagger.io\/v2\/swagger.json/swagger.json/g' swagger/index.html
RUN echo '------------------------------------------------------------'
RUN cat 'swagger/index.html'
RUN echo '------------------------------------------------------------'
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" . RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" .