1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-09-01 10:23:38 +02:00

fix Docker build and import issues

This commit is contained in:
Nick Sweeting
2024-10-08 00:12:09 -07:00
parent 835f961aed
commit 397ae1a99b
6 changed files with 125 additions and 87 deletions

View File

@@ -237,12 +237,12 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=apt-$TARGETARCH$T
) | tee -a /VERSION.txt
# Install Node dependencies
WORKDIR "$CODE_DIR/lib/npm"
COPY --chown=root:root --chmod=755 "etc/package.json" "$CODE_DIR/lib/npm"
WORKDIR "/usr/share/archivebox/npm"
COPY --chown=root:root --chmod=755 "etc/package.json" "/usr/share/archivebox/npm"
RUN --mount=type=cache,target=/root/.npm,sharing=locked,id=npm-$TARGETARCH$TARGETVARIANT \
echo "[+] Installing NPM extractor dependencies from package.json..." \
&& npm install --prefix="$CODE_DIR/lib/npm" --prefer-offline --no-fund --no-audit --cache /root/.npm \
&& chown -R "$DEFAULT_PUID:$DEFAULT_PGID" "$CODE_DIR/lib" \
&& npm install --prefix="/usr/share/archivebox/npm" --prefer-offline --no-fund --no-audit --cache /root/.npm \
&& chown -R "$DEFAULT_PUID:$DEFAULT_PGID" "/usr/share/archivebox" \
&& ( \
which node && node --version \
&& which npm && npm version \