I'm new to docker and have followed the installation instructions on their site here.
The installation completed successfully:
docker -v
Docker version 1.8.1, build d12ea79
but when I try to run
sudo docker run hello-world
I get the following:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
535020c3e8ad: Pulling fs layer
af340544ed62: Layer already being pulled by another client. Waiting.
af340544ed62: Layer already being pulled by another client. Waiting.
This then continues to hang indefinitely.
I have tried restarting the service and my entire machine. I always get the same problem.
Any idea what's causing this or how to resolve?
This command helped on my end on Ubuntu 14.04 (Docker version 1.8.1, build d12ea79):
sudo restart docker
This seems to have now resolved itself. Quite possibly it was caused by a problem at docker's end.
Related
I am using docker on my CentOS Linux release 7.8.2003 (Core) with 16 GB RAM. My docker version is Docker version 19.03.7. Docker-compose version is docker-compose version 1.23.2. I have 30+ docker containers running on my machine.
Everything was working smoothly, but I ran into a problem. Sometimes, when I try to run a container I get this error
ERROR: for container_name Cannot start service container_name: OCI runtime create failed: container_linux.go:349:
starting container process caused "process_linux.go:319: getting the final child's pid from pipe caused \"EOF\"": unknown
When I retry 3-5 times to run container, the container started successfully. Sometimes I need to restart docker service and my server to make it working. I don't know the exact reason why It is giving me this error sometimes and gets created successfully sometimes with same docker-compose file.
Can somebody explain this weird behavior of docker to me? Is it due to so many containers running on my machine or something else?
I had a similar issue:
OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:722: waiting for init preliminary setup caused: EOF: unknown
and the problem turned out to be the wrong version of my WSL distro, which was 1 instead of 2:
PS C:\Users\myself> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 1
So I used the wsl --set-version command to upgrade it:
PS C:\Users\myself> wsl --set-version Ubuntu 2
PS C:\Users\myself> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
Then I was able to successfully build my Docker image.
Hope can help someone.
Came across this link, which solved the issue for me. It apparently works for WSL, but definitely also for my Ubuntu 18.04 installation: the latest version(s) of docker have this problem, a few versions back they haven't.
I am a complete newb to Docker and am running Linux 18.04.6 Bionic Beaver
docker --version reports Docker version 20.10.7, build 20.10.7-0ubuntu5~18.04.3
I'm not sure if this is the solution, but after reinstalling Docker from various unrelated problems I ran runc init and killed an old running dockerd process and was able to get hello-world to run. I've wasted so much time on it that I don't want to find the root cause.
I am currently despairing at the attempt of setting up a docker build step in Atlassian Bamboo.
For starters, I just want to create a build configuration that runs the hello-world image as a proof of confluence. So far, I have failed.
I have tried following the steps on https://confluence.atlassian.com/bamboo0609/using-bamboo/jobs-and-tasks/configuring-tasks/configuring-the-docker-task-in-bamboo , but to no avail.
My setup is this:
We have Bamboo installed on an Ubuntu server. I also installed Docker on that server and added the bamboo user to the docker usergroup and restarted the server to make sure the permission change takes effect. At this point, docker run hello-world works when I run it directly on the server. I can also confirm that this is the server that Bamboo runs on since Bamboo went offline whenever I restarted the server that I installed Docker on.
Then, I have added the docker capability to the server (the agent is the default agent, so it inherits this capability from the server). As the docker path, I have tried various things, none of which worked (aka, the following errors remained the same for each of these):
/snap/docker (the first folder that I found on a manual search)
/usr/bin/docker (the recommended path, though on inspecting the Ubuntu server I quickly found out that no docker folder exists under /usr/bin on the Ubuntu derver)
/var/snap/docker/common/var-lib-docker (the path that Docker returns as its Root Directory when I run docker info on the Ubuntu server)
/var/snap/docker (for good measure)
Now, for the runner, I have tried two different approaches.
First, I tried using a Docker runner with the following settings:
Command: Run a Docker container
Docker image: hello-world
This returns the following error message:
┊
Error occurred while running Task 'Hello World Docker Test(5)' of type com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli.com.atlassian.bamboo.task.TaskException: Failed to execute task
┊
Caused by: com.atlassian.bamboo.docker.DockerException: Error running Docker run command
┊
Caused by: com.atlassian.utils.process.ProcessException: Error executing /snap/docker run --volume /var/atlassian/application-data/bamboo/xml-data/build-dir/CAM-DOC-JOB1:/data --workdir /data --rm hello-world
┊
The second was just to run a shell runner for the command docker run hello-world, which returned the following error:
docker: not found
At this point, I feel like I'm out of ideas. Everything points towards Bamboo for some reason not finding Docker on the server, even though I can clearly confirm that it is there. I have tried various different approaches of telling Bamboo where to find Docker, but none of them have worked.
It's obvious that I'm doing something wrong, but I can't figure out what. Or maybe the problem lies in an entirely different direction altogether? Anyway, I would be grateful for any insight shared on this matter.
Okay, I found out what caused this strange behaviour.
The problem was that I installed Docker using sudo snap install docker, and apparently installing docker via snap causes problems with Bamboo.
So I got it to work using these simple steps:
[Server] Uninstalled Snap Docker using sudo snap remove docker
[Server] Reinstalled Docker using sudo apt install docker.io
[Bamboo] Changed the path to Docker in the Server Capabilities to /usr/bin/docker
After that, the hello-world image build succeeded and printed the expected output to the log.
$ docker pull oraclelinux
Using default tag: latest
latest: Pulling from library/oraclelinux
c93adbd5ca8c: Downloading [==================================================>] 85.96MB/85.96MB
unexpected EOF
$ docker --version
Docker version 18.09.2, build 6247962
I notice that docker pull continously retries with back-off for a few times and eventually fails with unexpected EOF. Same issue observed if pulling centos, debian image.
The docker pull of this image from a repository in local network succeeds. I'm trying to figure out the failure for pulls from github.io.
docker pull for smaller size images (ex: alpine, helloworld) succeeds.
Running Docker Desktop Version 2.0.0.3 (31259) on MacOS High Sierra. Restarting Docker did not resolve the issue.
Any pointers are greatly appreciated.
Found an answer. I had to use Manual Proxy Configuration within Docker Desktop to point to an internal corp proxy for this to work.
I'm trying sudo docker pull ubuntu on Docker 1.13.1 on Ubuntu 16.04.2 LTS and getting error:
Error response from daemon: manifest for ubuntu:latest not found
I don't use proxy so I have no idea where manifest got lost.
Well, it just started working 3 hours later without any intervention, so I make a conclusion that the problem was caused by Docker Hub incident.
This is caused by S3 outage, see docker- issue.
For some reason Docker haven't noticed yet, according to status.
Funny thing is that one can see other services unavailable like GitHub or Travis CI.
I have a fresh install using boot2docker. (DockerToolbox was giving me the same error. After uninstalling DockerToolbox, I deleted ~/.docker and searched my whole filesystem for anything starting with "docker" and found no other configuration files where things might be hiding.)
This is the second command I did, after docker run hello-world:
bash-3.2$ docker run -it ubuntu /bin/bash
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
6071b4945dcf: Verifying Checksum
5bff21ba5409: Pulling fs layer
e5855facec0b: Download complete
8251da35e7a7: Download complete
8251da35e7a7: Layer already being pulled by another client. Waiting.
And I'm stuck here indefinitely.
I promise I only have 1 docker process running. I just want to get past this. If it means nuking whatever cache is in place and doing a manual download, that's okay. I just want to stop being stuck here for hours.
You need to restart Docker service or just restart the OS.
Also in this issue #avramirez pointed out that you can do this using boot2docker:
boot2docker stop
boot2docker up
docker pull <repo>
quote from issue#15603 message:
Hello all! I believe this should by fixed on master by #15489 (and
will soon ship in a few weeks as part of Docker 1.9.0).
This is a bug in Docker.
Try out the following in order (Trying to avoid restarting the OS):
ps aux | grep docker-compose and find the PID of docker-compose processes running.
Kill them using kill <pid>
Restart Docker using service docker restart (linux)
2nd method should ideally solve the problem, if not, Restart the OS.
Hopefully, this issue will be solved in version 1.9