Skip to content
This repository was archived by the owner on Aug 29, 2022. It is now read-only.

Conversation

danielozano
Copy link

Hi! First of all thanks a lot for your work!

Working with this image I found an error, when you use the env variables: UNISON_USER, UNISON_GROUP, UNISON_GID, UNISON_UID. The container fails when you run docker-compose up after the first time.

The problem is that the user/group are created inside a script, that is executed every time you turn on the container. So if the user/group already exists (they are created the first time you build the container) it will fail: addgroup: group 'NAME' in use, and the same for the user.

So you've the option of always use --build when turning on the container.

The ideal solution should be delete the user/group and create them again, because you could've only changed the GID/UID. But as you're using alpine groupdel/userdel are not available and I don't want to install anything in your image!

So in resume, I've just added a check that will only create the user/group when they doesn't exists.

Regards!

(If you want to reproduce it, just set the env variables and run docker-compose up SERVICE_NAME twice, the second time it should fail)

@danielozano
Copy link
Author

I didn't notice about #18 .
It's already fixed there. If you want I can just close the PR!

Thanks, and sorry for not take a look at the already existing PRs!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant