-
-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support running docker in rootless mode? #3267
Comments
There aren't plans to support this in 3.x. @pirog would any of the architectural updates in 4.x help users run rootless? |
beyond the initial installation lando runs entirely in userspace eg docker runs in rootless mode by default. we do not support the opposite eg running lando, and by extension docker, as the root user. so my guess is something else is going on here. |
@0tofu if you have further debugging explorations you'd like to do, feel free to reopen this or (perhaps better) jump on the Lando Slack: https://launchpass.com/devwithlando Curious to hear if you figured something out! |
tl;drLando won't run in Docker's rootless mode because it's using the wrong socket. It should use Seems to me that Lando is not entirely ready for rootless Docker. ReproduceI'm trying to get Lando running with Docker in rootless mode, using Ubuntu 21.10, Docker 20.10.12, Lando 3.6.0. First, install Docker by following the official install instructions. On Ubuntu this eventually means # ...
sudo apt install docker-ce docker-ce-cli containerd.io Second, I follow the instructions for setting up rootless Docker. That includes: # Disable system-wide docker service
sudo systemctl disable --now docker.service docker.socket
# Docker setup for current user
dockerd-rootless-setuptool.sh install
# Run docker service in user space
systemctl --user start docker
# Launch service on system startup
systemctl --user enable docker
sudo loginctl enable-linger $(whoami)
# Socket path is now in user space.
# See https://docs.docker.com/engine/security/rootless/#client
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
# Without this, lando init won't work. Not sure why.
docker context use rootless Now rootless Docker works. We're trying without docker run hello-world Rootless Lando doesn't work. It does not understand we're now in rootless mode. # Init works
lando init --recipe lamp --name rootless-test --webroot '.'
# Start fails
lando start
# Error message
Unhandled rejection Error: connect EACCES /var/run/docker.sock Possible SolutionLando uses a wrong socket path: So we explicitly specify the socket path in engineConfig:
host: 127.0.0.1
port: 4333
# Replace MY_UID with your actual UID.
socketPath: /run/user/MY_UID/docker.sock Running Remaining issues:
|
If you run lando with docker in rootless mode, the owner and group of the ~/.lando and hello directories will be changed and you will get a permission denied and will not be able to run it.
ERROR ==> EACCES: permission denied, open '/home/xxxxx/.lando/cache/hello.build.lock'
Is there a way to run it in rootless mode or is there a plan to support it?
directory list
docker version
The text was updated successfully, but these errors were encountered: