-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Because of non-matching UID/GID between host system and the wodby/php image, I'm trying to build my own image (for development purposes). The build process however fails when trying to delete the group the I gave as parameter. Here the details:
My en_make file.
// ./en_make
PHP_VER=8.1.10
PHP_DEV=1
WODBY_USER_ID=1853894834
WODBY_GROUP_ID=100The
WODBY_USER_IDandWODBY_GROUP_IDcorrespond to theUIDand primaryGIDof my user on the host system.
The command I use to launch the build process.
$ make buildx-build-amd64Build output with error message (truncated):
docker buildx build --platform linux/amd64 -t wodby/php:8.1-dev \
--build-arg PHP_VER=8.1.10 \
--build-arg PHP_DEV=1 \
--build-arg WODBY_USER_ID=1853894834 \
--build-arg WODBY_GROUP_ID=100 \
--build-arg PECL_HTTP_PROXY="" \
--load \
./
[+] Building 2.5s (6/10)
=> [internal] load build definition from Dockerfile
...
=> ERROR [2/6] RUN set -xe; existing_group=$(getent group "${WODBY_GROUP_ID}" | cut -d: -f1); ...
...
#0 0.603 + getent group 100
#0 0.604 + cut -d: -f1
#0 0.604 + existing_group=users
#0 0.604 + '[[' -n users ]]
#0 0.605 + delgroup users
#0 0.605 delgroup: 'guest' still has 'users' as their primary group!
...
make: *** [Makefile:55: buildx-build-amd64] Error 1If I'm not wrong, the build process fails because it is trying to delete the group with id 100.
Question:
While the user on my host system belongs to other groups that I can use for the build process, is it possible, instead of trying to delete the group, to add the user to the existing group in the docker image?