fix: dockerfile slim
This commit is contained in:
parent
0357905d87
commit
3bb5909053
14
Dockerfile
14
Dockerfile
@ -1,11 +1,13 @@
|
||||
FROM node:18-alpine3.18 as webui
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
COPY ./webui .
|
||||
RUN npm install && npm run build
|
||||
|
||||
FROM images.local/golang:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
RUN buf generate
|
||||
RUN cd webui && npm install && npm run build &&\
|
||||
cd .. && go mod tidy && go build .
|
||||
COPY . .
|
||||
COPY --from=0 dist ./webui/dist
|
||||
RUN buf generate && go mod tidy && go build .
|
||||
|
||||
EXPOSE 38080
|
||||
ENTRYPOINT [ "./pastebin", "api" ]
|
||||
|
4
go.mod
4
go.mod
@ -1,13 +1,13 @@
|
||||
module pastebin
|
||||
|
||||
go 1.20
|
||||
go 1.21.0
|
||||
|
||||
require (
|
||||
github.com/gin-gonic/gin v1.9.1
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/sqids/sqids-go v0.4.1
|
||||
gitter.top/coco/coco v0.0.0-20231013143029-cb23d9e80ddd
|
||||
gitter.top/coco/coco v0.0.1
|
||||
gitter.top/common/lormatter v0.0.0-20230910075849-28d49dccd03a
|
||||
gitter.top/drivers/sdbc v0.0.0-20230929063242-b4baa9aa7ff8
|
||||
google.golang.org/protobuf v1.31.0
|
||||
|
Loading…
Reference in New Issue
Block a user