cweagans / docker-bg-sync

A container that syncs files between two configurable directories.
224 stars 39 forks source link

Run unison as a non-root user (specifying the UID and GUID to own the files) #11

Closed davide closed 6 years ago

davide commented 6 years ago

Useful for ensuring that file ownership in shared volumes matches across containers.

cweagans commented 6 years ago

I'm not opposed to this, but two changes please:

  1. All of the stuff you're doing in the Dockerfile needs to live in sync.sh instead. This way, it's a configurable value without having to rebuild the container (i.e. this should be startup configuration, not build configuration).

  2. Please default to root so that we're not changing behavior for existing users. I know it's not ideal, but I don't want to break existing setups.

davide commented 6 years ago

Good input! I added a commit with the suggested changes. Let me know if if needs further improvements.

cweagans commented 6 years ago

This looks great. Thanks for the revisions!

davide commented 6 years ago

You're welcome! I noticed that you already pushed a new Docker Hub based on this. Thanks!!