Docker Compose stuck downloading or pulling fs lay

2019-04-04 19:06发布

I have the latest Docker for Mac installed, and I'm running into a problem where it appears that docker-compose up is stuck in a Downloading state for one of the containers:

± |master ✗| → docker-compose up --build
Pulling container (repo.io/company/container:prod)...
prod: Pulling from company/container
somehash: Already exists
somehash: Already exists
somehash: Already exists
somehash: Already exists
somehash: Pulling fs layer
somehash: Already exists
somehash: Already exists
somehash: Downloading [=================================================> ] 234.6 MB/239.3 MB
somehash: Download complete
somehash: Download complete

^^ this is literally what it looks like on my command line. Stopping and starting hasn't helped, it immediately outputs this same output.

I've tried to rm the container but I guess it doesn't yet exist, it returns the output No stopped containers. --force-recreate also gets stuck in the same place. And perhaps I'm not googling for the right terminology but I haven't found anything useful to try - any pointers?

4条回答
SAY GOODBYE
2楼-- · 2019-04-04 19:48

I had a similar problem on docker for windows for a couple of days and when I tried to connect to the virtual machine (via Hyper-V Manager) the downloads started speeding along. I have no idea why but it worked for me...

Screenshot

查看更多
狗以群分
3楼-- · 2019-04-04 19:49

I'm running OSX and restarting Docker for Mac didn't help. Neither did a full restart or upgrading VirtualBox. What did work was turning my wifi interface on and off every time it got stuck. I had to do this repeatedly, but it eventually downloaded the entire image.

查看更多
We Are One
4楼-- · 2019-04-04 19:54

I had the similar situation this morning where my network suddenly went down and I was forced to power cycle the modern, while docker-compose was still in the middle of downloading stuff from docker hub.

Yes, bouncing the docker daemon process seems to resolve this.

For Linux users - do sudo service docker restart to fix it.

查看更多
Lonely孤独者°
5楼-- · 2019-04-04 20:06

I just needed to restart Docker.

Linux users can use sudo service docker restart.

Docker for Mac has a handy button for this in the Docker widget in the OS X toolbar: Docker for Mac in the OS X toolbar with restart button

If you happen to be using Docker Toolkit try docker-machine restart.

查看更多
登录 后发表回答