hijnu commited on
Commit
e030ef8
1 Parent(s): 7197107

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -42,7 +42,7 @@ ENV POSTGRES_USER=${POSTGRES_USER} \
42
  PATH="$WORKDIR/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
43
 
44
  COPY requirements.txt ${WORKDIR}/requirements.txt
45
- COPY package.json ${WORKDIR}/package.json
46
 
47
  # 安装必要的软件包、Node.js,Python,并设置时区,清理 apt 缓存以减少镜像大小
48
  RUN apt-get update && apt-get install -y \
@@ -58,7 +58,7 @@ RUN apt-get update && apt-get install -y \
58
  python3 -m venv $VIRTUAL_ENV && \
59
  $VIRTUAL_ENV/bin/pip install --upgrade pip && \
60
  $VIRTUAL_ENV/bin/pip install -r ${WORKDIR}/requirements.txt && \
61
- npm install --production
62
 
63
  # 设置工作目录并复制脚本
64
  WORKDIR ${WORKDIR}
 
42
  PATH="$WORKDIR/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
43
 
44
  COPY requirements.txt ${WORKDIR}/requirements.txt
45
+ COPY package.json ${WORKDIR}/package.txt
46
 
47
  # 安装必要的软件包、Node.js,Python,并设置时区,清理 apt 缓存以减少镜像大小
48
  RUN apt-get update && apt-get install -y \
 
58
  python3 -m venv $VIRTUAL_ENV && \
59
  $VIRTUAL_ENV/bin/pip install --upgrade pip && \
60
  $VIRTUAL_ENV/bin/pip install -r ${WORKDIR}/requirements.txt && \
61
+ npm install -g $(cat ${WORKDIR}/package.txt)
62
 
63
  # 设置工作目录并复制脚本
64
  WORKDIR ${WORKDIR}