efrecon / docker-s3fs-client

Alpine-based s3fs client: mount from container, make available to other containers
BSD 3-Clause "New" or "Revised" License
181 stars 64 forks source link

Allow specifying existing GIDs #7

Closed totycro closed 3 years ago

totycro commented 3 years ago

Before, using an existing GID would result in an error when creating the user.

When the entry point script creates a new group, it uses the GID as id and name. adduser expects the group name. If the group already existed before, then it most likely didn't have the id as its name, so adduser fails. Then in turn executing s3fs fails because the user is not found.

This patch detects if the group is already present and uses it in that case.

efrecon commented 3 years ago

Thx @totycro