-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Description
Describe the bug
I am unable to compile the docker image while using ZFS as file system.
To Reproduce
Steps to reproduce the behavior:
- clone git repository
- make adjustments to config files and add dependency on some plugins
docker compose build
it fails with a message similar to:
30.21 ERR_PNPM_EAGAIN EAGAIN: resource temporarily unavailable, copyfile '/root/.local/share/pnpm/store/v10/files/6b/8aae75aeaa2150548d86f1f0025cec9ddbc7dfa3c1f51e87de87721ec64ef31b60da2b04871838ca951cea1bb83af0dc518ab16d08e5334119d12aef4de27b' -> '/opt/etherpad-lite/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js_tmp_1/LICENSE'
------
[+] build 0/1
⠙ Image my/etherpad2:latest Building 35.0s
Dockerfile:12
--------------------
10 | WORKDIR /opt/etherpad-lite
11 | COPY . .
12 | >>> RUN pnpm install
13 | RUN pnpm run build:ui
14 |
--------------------
It is very likely, that this problem is on the side of pnpm and ZFS. So I don't expect that the workaround, I describe below, will be added to this repository. But I hope, that others who run into this problem, have an easier time resolving the problem.
Expected behavior
I would expect that building the image works.
Workaround
The workaround described here helped me to mitigate the problem:
pnpm/pnpm#7024 (comment)
With the following changes I was able to get a completed docker image build:
diff --git a/Dockerfile b/Dockerfile
index 1b0a45d1a..0c21ebb09 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,7 +9,7 @@ FROM node:lts-alpine AS adminbuild
RUN npm install -g pnpm@latest
WORKDIR /opt/etherpad-lite
COPY . .
-RUN pnpm install
+RUN pnpm install --package-import-method=hardlink
RUN pnpm run build:ui
diff --git a/bin/installDeps.sh b/bin/installDeps.sh
index af2b5e30a..0f416a77b 100755
--- a/bin/installDeps.sh
+++ b/bin/installDeps.sh
@@ -36,10 +36,10 @@ fi
log "Installing dependencies..."
if [ -z "${ETHERPAD_PRODUCTION}" ]; then
log "Installing dev dependencies with pnpm"
- pnpm --recursive i || exit 1
+ pnpm --recursive i --package-import-method=hardlink || exit 1
else
log "Installing production dependencies with pnpm"
- pnpm --recursive i --production || exit 1
+ pnpm --recursive i --production --package-import-method=hardlink || exit 1
fi
# Remove all minified data to force node creating it new
diff --git a/bin/installLocalPlugins.sh b/bin/installLocalPlugins.sh
index 15442e646..d99ec4a86 100755
--- a/bin/installLocalPlugins.sh
+++ b/bin/installLocalPlugins.sh
@@ -39,7 +39,7 @@ if [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then
plugin=$(trim "$plugin")
if [ -d "local_plugins/${plugin}" ]; then
echo "Installing plugin: '${plugin}'"
- pnpm install -w ${PNPM_OPTIONS:-} "local_plugins/${plugin}/"
+ pnpm install -w ${PNPM_OPTIONS:-} "local_plugins/${plugin}/" --package-import-method=hardlink
else
( echo "Error. Directory 'local_plugins/${plugin}' for local plugin " \
"'${plugin}' missing" >&2 )
diff --git a/bin/updatePlugins.sh b/bin/updatePlugins.sh
index 8d0f43fd5..40a9a0236 100755
--- a/bin/updatePlugins.sh
+++ b/bin/updatePlugins.sh
@@ -8,4 +8,4 @@ OUTDATED=$(npm outdated --depth=0 | awk '{print $1}' | grep '^ep_') || {
}
set -- ${OUTDATED}
echo "Updating plugins: $*"
-exec pnpm install "$@"
+exec pnpm install "$@" --package-import-method=hardlinkServer (please complete the following information):
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels