[Fuego] Dockerfile problem: cannot add group

Georg Piewald gpi at mailbox.org
Mon Oct 29 22:48:03 UTC 2018


Hi Tim,

Because I just read that you plan a release this week, I thought I 
better report this problem right away.

In the Dockerfile, there's an issue with this command:

RUN groupadd -g ${gid} ${group} \
  [...]

In several Linux distros the the primary group of each user is "users", 
with GID 100. In this case, ${gid} in the above command will be 100 
(which is passed through docker-build-image.sh). However, in Debian 
Jessie, which is the guest OS in the container, exactly this group with 
GID 100 already exists. Thus the above command fails and the container 
won't be created.

My solution was to first check if a group with this GID already exists, 
and only create it if it doesn't:

RUN getent group ${gid} > /dev/null || groupadd -g ${gid} ${group}; \
   [...]

You might prefer any other solution, but it should fixed anyhow, because 
it's a quite annoying problem to newbies.

BR, Georg



More information about the Fuego mailing list