This commit is contained in:
Shahrad Elahi
2023-12-19 14:55:45 +03:30
parent 2fc2ab4259
commit 479c4093fc
2 changed files with 23 additions and 33 deletions

View File

@@ -27,25 +27,16 @@ COPY /config/obfs4-bridges.conf /etc/torrc.d/obfs4-bridges.conf
COPY /scripts /scripts
RUN chmod -R +x /scripts
COPY /bin /usr/local/bin
RUN chmod -R +x /usr/local/bin
FROM base AS deps
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN mkdir -p /temp/dev/
COPY web/package.json web/pnpm-lock.yaml /temp/dev/
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile -C /temp/dev/
COPY /bin /app/bin
RUN chmod -R +x /app/bin
ENV PATH="$PATH:/app/bin"
FROM base AS runner
COPY --from=deps /temp/dev/node_modules node_modules
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh