build: 分开镜像

This commit is contained in:
liqiang-fit2cloud 2024-03-15 18:48:17 +08:00
parent df42bb8cd8
commit 29afb0d42b
2 changed files with 4 additions and 5 deletions

View File

@ -14,6 +14,8 @@ VOLUME /opt/maxkb
# 拷贝项目
COPY . /opt/maxkb/app
COPY installer/config.yaml /opt/maxkb/conf
ENV POSTGRES_USER root
ENV POSTGRES_PASSWORD Password123@postgres
RUN rm -rf /opt/maxkb/app/ui /opt/maxkb/app/build
COPY --from=vector-model model /opt/maxkb/app/model
COPY --from=web-build ui /opt/maxkb/app/ui

View File

@ -10,12 +10,9 @@ COPY installer/init.sql /docker-entrypoint-initdb.d
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
ENV POSTGRES_USER root
# ---- install python --- #
# ---- below content is copied from https://github.com/docker-library/python/blob/master/3.11/slim-bullseye/Dockerfile --- #
ENV POSTGRES_PASSWORD Password123@postgres
# ---- prepare python env --- #
# ---- below content is copied https://github.com/docker-library/python/blob/master/3.11/slim-bullseye/Dockerfile --- #
# ensure local python is preferred over distribution python
ENV PATH /usr/local/bin:$PATH