aerokube / cm

Configuration manager for Aerokube products
https://aerokube.com/cm/latest/
Apache License 2.0
119 stars 31 forks source link

Docker Rootless (not supported) #329

Closed niklasschaeffer closed 1 year ago

niklasschaeffer commented 1 year ago

Hi, currently there is no way to tell CM to start docker containers as user in Linux. Basically you have to symlink the docker.sock from the home directory path to the unix run path like so:

ln -s ~/.docker/desktop/docker.sock /var/run/docker.sock

Is there a way we could get this to work with a user install ?

vania-pooh commented 1 year ago

@niklasschaeffer nothing prevents you from adding your regular user to Docker group. This socket /var/run/docker.sock is owned by docker group and has all permissions.

# usermod -a -G docker someuser
niklasschaeffer commented 1 year ago

nah you are missing the point. if you install docker desktop for linux you can simply only install it inside user directory. there is no file /var/run/docker.sock existent.

vania-pooh commented 1 year ago

@niklasschaeffer we never tested such scenario but CM relies on standard Docker client and so variables like DOCKER_HOST and other ones will work. https://docs.docker.com/engine/reference/commandline/cli/#environment-variables

niklasschaeffer commented 1 year ago

@vania-pooh you were right DOCKER_HOST does work indeed :) thanks