Editing
Troubleshooting of docker errors
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Troubleshooting of docker errors == General Troubleshooting Steps of Docker Errors == === Viewing Docker Logs === Enter the following command <pre> tail /home/dockerd.log </pre> Or the see the log of specific container ID <pre> docker logs <Container ID> # OR enter the following command which the log was updated automatically docker logs -f --details <Container ID> </pre> === Useful Tools === * [https://hadolint.github.io/hadolint/ Dockerfile Linter] == Common Error Solutions == === Error: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? === Error condition: After I inputted the command {{kbd | key = docker ps}}, I met the error message as follows: <pre> Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? </pre> Solution: * On CentOS: {{kbd | key = sudo systemctl start docker}}<ref>[https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7 How To Install and Use Docker on CentOS 7 | DigitalOcean]</ref> === Error response from daemon: dial unix docker.raw.sock: connect: connection refused (on Mac) === Error condition: After I inputted the command {{kbd | key = docker ps}}, I met the error message as follows: <pre> Error response from daemon: dial unix docker.raw.sock: connect: connection refused </pre> Solution: Make sure the docker is running. After docker was lunched, the result of command {{kbd | key = docker ps}} should be: <pre> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES </pre> === Error response from docker desktop: credential when tried to docker push === Solution: Login the account of docker hub === Error response from docker desktop: denied: requested access to the resource is denied when tried to docker push === Solution: Add tag to the docker image you want to publish<ref>[https://stackoverflow.com/questions/43858398/docker-push-error-denied-requested-access-to-the-resource-is-denied docker push error "denied: requested access to the resource is denied" - Stack Overflow]</ref> <pre> docker tag <IMAGE ID> <ACCOUNT NAME>/<NAME>:<TAG> </pre> == References == <references /> {{Template:Troubleshooting}} [[Category: Programming]] [[Category: Docker]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Kbd
(
edit
)
Template:Troubleshooting
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information