From 8aacf5f208cc5986d94492d40f481b98ffd7f97a Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Thu, 15 Aug 2024 19:13:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=88=9B=E5=BB=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/installer/Dockerfile b/installer/Dockerfile index d5823ec0f6..ccfeb5a7c5 100644 --- a/installer/Dockerfile +++ b/installer/Dockerfile @@ -17,8 +17,7 @@ RUN apt-get update && \ COPY . /opt/maxkb/app RUN mkdir -p /opt/maxkb/app /opt/maxkb/model /opt/maxkb/conf && \ - rm -rf /opt/maxkb/app/ui && \ - useradd -m sandbox && mkdir /opt/maxkb/app/sandbox && chown sandbox:sandbox /opt/maxkb/app/sandbox && chmod 700 /opt/maxkb/app/sandbox + rm -rf /opt/maxkb/app/ui COPY --from=web-build ui /opt/maxkb/app/ui WORKDIR /opt/maxkb/app @@ -59,7 +58,11 @@ COPY --from=vector-model /opt/maxkb/app/model /opt/maxkb/model RUN chmod 755 /opt/maxkb/app/installer/run-maxkb.sh && \ cp -r /opt/maxkb/model/base/hub /opt/maxkb/model/tokenizer && \ cp -f /opt/maxkb/app/installer/run-maxkb.sh /usr/bin/run-maxkb.sh && \ - cp -f /opt/maxkb/app/installer/init.sql /docker-entrypoint-initdb.d + cp -f /opt/maxkb/app/installer/init.sql /docker-entrypoint-initdb.d && \ + mkdir /opt/maxkb/app/sandbox && \ + useradd --no-create-home --home /opt/maxkb/app/sandbox --shell /bin/bash sandbox && \ + chown sandbox:sandbox /opt/maxkb/app/sandbox + EXPOSE 8080