diff --git a/docker/Dockerfile b/docker/Dockerfile index 90b86dbe..d9743bc0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -18,11 +18,7 @@ RUN git clone -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \ && cp -f .env.example .env \ && chmod 777 ${QL_DIR}/shell/*.sh \ && chmod 777 ${QL_DIR}/docker/*.sh \ - && sed -i '/sqlite3/d' package.json \ - && pnpm install --prod \ - && cp -rf /usr/local/pnpm-global/5/node_modules/sqlite3 ./node_modules/ \ - && cp -rf /usr/local/pnpm-global/5/node_modules/.pnpm/sqlite* ./node_modules/.pnpm/ \ - && git checkout . \ + && cp -rf /node_modules ./ \ && pnpm install --prod \ && rm -rf /root/.pnpm-store \ && git clone -b ${QL_BRANCH} https://github.com/${QL_MAINTAINER}/qinglong-static.git /static \ diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index a3296198..eb1da45c 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -7,6 +7,7 @@ ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ SHELL=/bin/bash \ PS1="\u@\h:\w \$ " +COPY package.json / RUN set -x \ && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ @@ -37,7 +38,8 @@ RUN set -x \ && git config --global user.name "qinglong" \ && npm install -g pnpm \ && pnpm install -g pm2 \ - && pnpm install -g ts-node typescript tslib sqlite3 \ - && rm -rf /root/.npm \ + && pnpm install -g ts-node typescript tslib \ + && cd / && pnpm install --prod \ + && rm -rf /root/.npm CMD [ "node" ]