Rootless docker, auto start problem.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, shell
- Domain
- devops, infrastructure
Research direction
Start by reviewing /etc/systemd/system/docker-rootless.service and the docker user's .bashrc, then reproduce the reboot and run the reported docker ps command. Check whether dockerd-rootless.sh is using the same runtime socket and environment as the client; done means the rootless daemon starts automatically and docker ps connects successfully.
Written by the indexing model from the issue text.
Description
Problem:
Cannot connect to the Docker daemon at unix:///run/user/1000/docker.sock. Is the docker daemon running?
Here's what I've done and wanting a solution:
- Created a user 'docker' on my CentOS 7.9.
- Ran the
curl -fsSL https://get.docker.com/rootless | sh - Created
/etc/systemd/system/docker-rootless.serviceas root with below contents:
`[Unit]
Description=Docker Rootless Startup
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/su -c /home/docker/bin/dockerd-rootless.sh - docker
TimeoutStartSec=0
[Install]
WantedBy=default.target`
- Ran
systemctl daemon-reload - Last but not least,
systemctl enable docker-rootless.servicewhich created the symlink. - Reboot.
However, the dockerd-rootless.sh runs, gets a PID but when running docker ps it returns:
Cannot connect to the Docker daemon at unix:///docker.sock. Is the docker daemon running?
I've tried adding:
export DOCKER_HOST=unix:///run/user/1001/docker.sock
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
to the .bashrc of the docker user.
Any help would be greatly appreciated.
Cheers.
- Dominant language
- Shell
- Stars
- 3.2k
- Forks
- 863
- Avg merge
- 3h 15m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/docker-install
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
docker/docker-install#575 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
docker/docker-install#559 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
docker/docker-install#554 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
docker/docker-install#548 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
docker/docker-install#540 ·
All issues in docker/docker-install
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
technical-debt
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ll7/robot_sf_ll7#9560 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
oSoWoSo/vOid_Community_repOsitory#148 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100