build: update Dockerfile.
This commit is contained in:
parent
d38a9c2659
commit
519e877cd6
@ -9,7 +9,8 @@ FROM node:18-alpine3.18 as web-build
|
|||||||
COPY ui ui
|
COPY ui ui
|
||||||
RUN cd ui && \
|
RUN cd ui && \
|
||||||
npm install && \
|
npm install && \
|
||||||
npm run build
|
npm run build && \
|
||||||
|
rm -rf ./node_modules
|
||||||
|
|
||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
|
|
||||||
@ -40,7 +41,5 @@ RUN pip3 install poetry
|
|||||||
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
|
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
|
||||||
# 下载python依赖
|
# 下载python依赖
|
||||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
RUN pip3 install --no-cache-dir -r requirements.txt
|
||||||
# 删除前端依赖
|
|
||||||
RUN rm -rf ui/node_modules
|
|
||||||
# 启动命令
|
# 启动命令
|
||||||
CMD ["bash","-c","python /opt/maxkb/app/main.py start"]
|
CMD ["bash","-c","python /opt/maxkb/app/main.py start"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user