Skip to content

Commit

Permalink
测试 dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
whyour committed Jan 8, 2023
1 parent dcfb721 commit cebc23c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
FROM node:alpine as builder
COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
RUN npm i -g pnpm \
&& cd /tmp/build \
&& pnpm install --prod

FROM python:3.10-alpine

ARG QL_MAINTAINER="whyour"
Expand Down Expand Up @@ -51,16 +57,12 @@ 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 \
&& pnpm install --prod \
&& rm -rf /root/.pnpm-store \
&& rm -rf /root/.local/share/pnpm/store \
&& rm -rf /root/.cache \
&& rm -rf /root/.npm \
&& git clone -b ${QL_BRANCH} https://github.com/${QL_MAINTAINER}/qinglong-static.git /static \
&& mkdir -p ${QL_DIR}/static \
&& cp -rf /static/* ${QL_DIR}/static \
&& rm -rf /static \
&& rm -rf /tmp/build
&& rm -rf /static

COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/

WORKDIR ${QL_DIR}

Expand Down

0 comments on commit cebc23c

Please sign in to comment.