Skip to content
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

Docker install update #7

Closed
mikeizbicki opened this issue Feb 3, 2021 · 12 comments
Closed

Docker install update #7

mikeizbicki opened this issue Feb 3, 2021 · 12 comments

Comments

@mikeizbicki
Copy link
Owner

mikeizbicki commented Feb 3, 2021

In class today, I had a problem getting the rootless docker system installed. I just reran the install procedure and now everything is working fine... I have no idea what has caused this change, but hopefully the install will work for you all now too.

@cduong21
Copy link

cduong21 commented Feb 3, 2021

Worked for me; thank you!

@samuellee19
Copy link

Mine wasn't working until I edited my unit file at ~/.config/systemd/user/docker.service. This is for those who get status=203/EXEC error (I'm assuming this applies to most people with daemon connection error). To fix it, change the directory of ExecStart to ExecStart=/home/username/.local/bin/dockerd-rootless.sh (replace username with yours).

Hope this helps!

@anan-ara
Copy link

anan-ara commented Feb 4, 2021

Samuel's fix worked for me! Thank you so much!

@chenpatrickc
Copy link

I previously "fixed" the problem by rerunning the install procedure. However I noticed that the fix worked because the $HOME/bin folder was reinstalled. Samuel's fix addresses the removal of the $HOME/bin folder.

@amytam01
Copy link
Contributor

amytam01 commented Feb 7, 2021

I've done everything suggested here. I "fixed" Docker after rerunning the install procedure and it worked until it didn't 15 minutes later. I have almost no idea why it broke.

Then, I tried to fix it by rerunning the install procedure and when that didn't work I attempted Samuel's fix and checked that everything from bin was moved to .local/bin and put the command DOCKER_HOST=unix:///run/user/1001/docker.sock in my .bashrc file. After running systemctl --user start docker I have no errors pop up, but when I try docker run ubuntu I get this classic error message: "docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create: dial unix /var/run/docker.sock: connect: permission denied. See 'docker run --help'.". I've tried exiting, restarting multiple times and everything.

Please help :')

@mikeizbicki
Copy link
Owner Author

@amytam01 It's a rather hard to read your post since all your commands are intermixed with normal text... but it looks like you are running the command

DOCKER_HOST=unix:///run/user/1001/docker.sock

when you should be using the export command to set the DOCKER_HOST, something like

export DOCKER_HOST=unix:///run/user/1001/docker.sock

Also, the string that you have to the right of the = is rather suspicious... the number 1001 is almost certainly supposed to be your user id, and your userid is not 1001.
If you run the command

export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

it should set the variable correctly.

@amytam01
Copy link
Contributor

amytam01 commented Feb 7, 2021

So I've ironed out some of the initial problems as mentioned by @mikeizbicki and ended up redoing the entire process and now have the correct export command in my .bashrc file. I've also made sure (again and again) that my docker files are not in bin but .local/bin. I've also followed Sam's suggestions and made sure my unit file was correct in ~/.config/systemd/user/docker.service

Now when I run
systemctl --user start docker
I have no problems, but when I try to run
docker run ubuntu
I get the following error:
-bash: /home/atam/bin/docker: No such file or directory
I think I got this error after moving my files from bin to .local/bin and I've reinstalled Docker at least 5 times (so maybe that's the problem?) I always assumed that my files were being rewritten each time they were moved. Thanks!

Edit: I've learned so much about docker commands and process after all of these issues, but I still can't get it to work xD

@mikeizbicki
Copy link
Owner Author

mikeizbicki commented Feb 7, 2021

@amytam01 Have you also updated your PATH? The command is

$ export PATH=~/.local/bin:$PATH

The fact that your error message begins with bash: means that it is bash that is trying to find the executable, and it cannot. And this suggests a malformed PATH.

@amytam01
Copy link
Contributor

amytam01 commented Feb 7, 2021

@amytam01 Have you also updated your PATH? The command is

$ export PATH=~/.local/bin:$PATH

The fact that your error message begins with bash: means that it is bash that is trying to find the executable, and it cannot. And this suggests a malformed PATH.

Screen Shot 2021-02-07 at 3 45 57 PM

So I did as you suggested, and realized that I didn't update this copied and pasted version of my problem. My current issue is that I'm getting is docker: Cannot connect to the Docker daemon at unix:///run/user/1137/docker.sock. Is the docker daemon running?.

@mikeizbicki
Copy link
Owner Author

@amytam01 I'll probably need to look at this over zoom with you to keep making progress. But the "nuclear" option is to delete everything in your home folder. And use ls -a to make sure you delete everything, including hidden files. Then you should be able to install from scratch without your previous installations getting in each other's way.

@whosayn
Copy link

whosayn commented Feb 14, 2021

@mikeizbicki I just ran into a similar issue as @amytam01 for some unknown reason, but trying the nuclear option didn't help at all. Need help!!!

@mikeizbicki
Copy link
Owner Author

@hfaara18 Without showing me what commands you are running and the corresponding error messages, there's no way for me to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants