Symlinking /etc/passwd files leads to invalid cross-device link errors when running apt commands. Internally, apt uses dpkg, which adds a user "irc" when performing apt installs/upgrades. This subprocess leads to the error. The solution implemented here creates a user with the same name and id as the current user. This gives both users the the same file permissions, without having to symlink /etc/passwd.
9 lines
183 B
Bash
Executable File
9 lines
183 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
docker build \
|
|
--build-arg docker_user=$USER \
|
|
--build-arg docker_user_id=$(id -u) \
|
|
--build-arg docker_password=$USER \
|
|
-t spark-crypto_18.04 \
|
|
.
|