fix: dockerfile slim
This commit is contained in:
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" ]
|
||||
|
||||
Reference in New Issue
Block a user