修改dockerfile
This commit is contained in:
+29
-4
@@ -2,8 +2,36 @@ FROM node:22-bookworm-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN sed -i \
|
||||
-e 's|http://deb.debian.org/debian|http://mirrors.aliyun.com/debian|g' \
|
||||
-e 's|http://deb.debian.org/debian-security|http://mirrors.aliyun.com/debian-security|g' \
|
||||
/etc/apt/sources.list.d/debian.sources \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
libgl1 \
|
||||
libglib2.0-0 \
|
||||
fontconfig \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
RUN python3 -m pip install \
|
||||
--break-system-packages \
|
||||
--no-cache-dir \
|
||||
-i https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
build123d
|
||||
|
||||
COPY text-to-cad ./text-to-cad
|
||||
|
||||
RUN rm -rf text-to-cad/viewer/packages/cadjs \
|
||||
&& cp -R text-to-cad/packages/cadjs text-to-cad/viewer/packages/cadjs \
|
||||
&& rm -rf text-to-cad/viewer/packages/implicitjs \
|
||||
&& cp -R text-to-cad/packages/implicitjs text-to-cad/viewer/packages/implicitjs
|
||||
|
||||
RUN cd text-to-cad/viewer && npm install
|
||||
RUN cd text-to-cad/apps/cad-agent-studio && npm install && npm run build
|
||||
|
||||
@@ -13,7 +41,4 @@ ENV PORT=3000
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["sh", "-lc", "cd /app/text-to-cad/apps/cad-agent-studio && npm run start -- -H 0.0.0.0 -p ${PORT}"]
|
||||
|
||||
|
||||
|
||||
CMD ["sh", "-lc", "cd /app/text-to-cad/apps/cad-agent-studio && npm run start -- -H 0.0.0.0 -p ${PORT}"]
|
||||
Reference in New Issue
Block a user