-
Notifications
You must be signed in to change notification settings - Fork 49
Description
I've been using dip
for a few weeks in my pursuit of doing Rails development inside of Docker (so that I don't have to install nodejs directly on my host). Mostly it works pretty good - usually a little bit smoother than running docker directly.
I've found that consistently generating files that where the UID and GID is my local UID / GID isn't actually very easy though.
On the dip readme, you do point out that:
if you want to use non-root user you can specify UID like so:
dip ssh up -u 1000
This especially helpful if you have something like this in your docker-compose.yml:
services: web: user: "1000:1000"
I am curious if you would consider a global configuration option to pass the current User ID and Group ID from the logged in user to the Docker environment though, ie: Process.uid
and Process.gid
?
For me, ideally each command would be passed the current UID / GID, rather than explicitly setting run_options: ["user=1000"]
on every command in dip.yml
Also, if we could grab UID / GID from Process.uid
and Process.gid
, we wouldn't need to write the uid
directly into the YAML file... In the case where you really do want it to run as root
maybe pass sudo
or doas
or similar to the run_options
. To me, that would seem much more consistent with *nix in general - user level by default, only as root when explicitly set.
Perhaps I'm just doing this all wrong and if do any insight that you can share will be much appreciated.
Ultimately the dip
experience is very good. I just wish I could reduce the number of times I run sudo chown...
:-)