on linux machine, or when I connect to boot2docker VM using putty, I can see this nice progress indicator when I'm pulling images:
1491ff176f58: Downloading [===========================> ] 1.481 GB/2.721 GB
Unfortunately when pulling exactly the same image from Git Bash (MinTTY) on Windows
git version 2.5.3.windows.1
docker version:
Client/Server: 1.8.2
There is no progress bar.
Any idea why?
Docker Toolbox 1.8.3+ has workaround for this issue:
NOTE: When using interactive commands, prepend winpty. Examples: 'winpty docker run -it ...', 'winpty docker exec -it ...'.
See:
https://github.com/docker/toolbox/blob/v1.8.3/windows/start.sh
For me it renders the progress bar, but it prints each state of progress bar as new line (not replacing lines like in ssh session).
UPD:
In Docker Toolbox v1.9.0c this issue has been fixed:
On Windows, use bash and the default terminal for the Docker
Quickstart Terminal instead of mintty. This fixes several bugs causing
cannot enable tty mode on non tty input or repository name component
must match "a-z0-9(?:[._]a-z0-9)*".
Some servers are providing info about the full size of the downloaded file. In this case you get a progress bar. Some servers are just streaming this data without size info, in this case docker can't show the data.
This is not a bug, this is a feature :) :)
Related
I just noticed the weirdest thing ever.
I built my docker image and called it rapidcompiler/encee-image:latest. This is my output of docker images
My docker image is based on Ubuntu 16.04 (Yeah, I know it's losing support this year. I gotta update it)
I tried to run the image into a container with the following command.
docker run -it --name=encee-flask -p 81:5000 -d -v ~/Documents/Encee\ Outputs/:/home/Encee\ Outputs/ rapidcompiler/encee-image:latest
When I ran it, this is what came up.
You can see that each time I try to run the command and hit enter, some discrepancy occurs in the name of the image, which docker can't find locally (obviously) and hence, tries to pull from dockerhub each time. At first, I thought this could be due to the Insert key being activated. But upon further experimentation, the Insert key did not prove to be a factor here.
My OS
I use Garuda Linux which is a distribution based on Arch Linux.
VS Code Version - (code - open source AUR release)
VS Code Colour Theme - Cyberpunk
Upon a fresh start of my ubuntu (on a virtualbox vm), I can build my images normally. Then very inconstantly, it can be the next time I try to build, or the 10th time, it will hang forever after running the command docker build .
Dockerfiles are in directories with 5~10 other files (which eliminates the issue with massive file amount slowing down docker while trying to locate the Dockerfile, as seen on other posts)
If I try to build for a new, very simple, Dockerfile (to eliminate any syntax error), it will also hang whenever it hangs with my project's Dockerfiles.
Beside, I am running minikube --driver=none and my images are used for deployments in kubernetes. (with none driver it's not required to run eval $(minikube docker-env) )
The only reliable fix is to stop the vm on which my ubuntu is running, start it again, and it will consistently allow me to build my images at least one time, then the issue comes back inconsistently.
This fix is quite inconvenient as I need to stop everything I am doing and it takes a bit of time.
I have tried to run docker system prune and to delete all the images already built.
What log could I check to find an issue going on when the build hangs ?
Any idea of the origin of the issue ?
Thanks a lot !
Ok this bug was viscous.
Sometimes when I need to check how my nginx server behave in one of the containers, I open the VM's graphical interface and pop firefox to have a look.
I only figured today that firefox prompt a pop-up after a while, asking for the admin password in order to access the keychain. And turns out docker do not build anything until this pop-up is open. Closing it or filling the password fixed my issue...
On another terminal window, please check the Docker Daemon Log using sudo journalctl -fu docker.service at the time of build command hanging. Also, you can check the list of running processes during the build execution.
I am using docker on windows. I installed docker following this link https://docs.docker.com/toolbox/toolbox_install_windows/. Then I built the image from https://github.com/floydhub/dl-docker
Now I want to save the image to my pc. This was the command I issued.
docker save -o c:/Users/Student/dl-docker-latest.tar 69b639351d9c
Then I got this error
Error response from daemon: write /mnt/sda1/var/lib/docker/tmp/docker-export-757581070/3cb616a54d6bdbb8bb42a53a62b44de10eb7d7ea63b4b0a5038493175e7e12b3/layer.tar: no space left on device
Can someone tell me what is going on ? I have more than enough space on my pc and the image is only 8GB.
How do I get to this location from my terminal ?
/mnt/sda1/var/lib/docker/tmp/docker-export-757581070/3cb616a54d6bdbb8bb42a53a62b44de10eb7d7ea63b4b0a5038493175e7e12b3
I followed http://phutchins.com/blog/2017/01/04/fixing-docker-no-space-left-on-device/ and typed docker run --rm --privileged floydhub/dl-docker:cpu df -h
I guess I need to increase the size of docker
The problem is that docker daemon uses its own way for export, import and build. So it may create a copy of the image temporarily. Which means if it s a 8GB image you may need additional space for the operation to work.
Docker for windows uses Hyper-V to create a Linux VM and runs docker inside it. There is default space allocated to it, so even though your laptop has space left the VM doesn't have.
So what's the solution.
Try STDOUT instead of file
docker save 69b639351d9c > c:/Users/Student/dl-docker-latest.tar
I have my doubts this would work, but worth a try
Increase the VM Size
Now I don't know if there a easier way for this. But you need to create the VM again with a bigger size
See the below issue for more details
https://github.com/docker/kitematic/issues/825
Or you can try resizing the existing disk using techniques mentioned in below article
http://derekmolloy.ie/resize-a-virtualbox-disk/
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?
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 macOS toolbar:
If you happen to be using Docker Toolkit try docker-machine restart.
I faced the same problem! Restarting the service didn't help, downloading again didn't help. It used to get stuck at random instances leaving me with no option but to kill the pull request.
One thing which worked for me was to download 1 file at a time. For Ubuntu users, you can use the following steps:
Stop the service:
sudo service docker stop
Start docker with max concurrent download set as 1:
sudo dockerd --max-concurrent-downloads 1
Download the required image:
sudo docker pull <image_name>
Download images, after that stop the terminal and start the daemon again as it was earlier.
sudo service docker start
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.
Go to the Docker Preferences from its menu bar icon. Within there is a "bug" icon. Click on that and then "clean / Purge data"
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.
Directly download the necessary images using docker, e.g.
docker pull company/container
and then run
docker-compose up
again. Worked for me on MacOS.
I found a possible workaround.
I have my docker engine installed in a Ubuntu 18.04 Snap Environment.
I discovered searching in some forums that users relate this behaviors to limitation in the download bandwith.
So in the picture below you are going to watch that the components was stucked
Part of the Downloads stucked and finally I cancelled the process CTRL + C
I added two parameters or flags in the configuration file that controls the docker daemon behavior: max-concurrent-downloads 1 and max-concurrent-uploads 1
In my case remember, i am working in a snap environment. This file is located in this directory: /var/lib/docker/current/config/daemon.json
REMEMBER TO STOP ALL DOCKER PROCESS BEFORE THE FILE MODIFICATION, AND CREATE BACKUP OF THE FILE
Add the two lines in the picture. This is going to help you to limit the downloads to only one by one
This is the process that helped me to resolve this problem.
Download Succesfull
I had this issue in my VirtualBox when doing a docker pull on the image but it got stuck at a specific position and never moved from there. So, the issue was due to the network adapters in my VM. I was using NAT by default. When I switched it to "Bridged adapter", the issue went away.
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...
Completely remove docker
Install docker again
It should work now
I tried to restar docker, update docker, but didnt help
I am on OS X.
I have been using kitematic for some time now, but today I wanted to switch to boot2docker, as I sometimes find kitematic very abstract to the user.
The problem I am facing is, is there a way to use all the images that I built in kitematic, in boot2docker. It took me considerable time to build 2 of them, and I certainly don't want to build them again.
I think one way would be to first push the image to docker hub using kitematic, and then pull it in boot2docker. But, that would consume a lot of data, as the image is pretty large.
The images are right now stored somewhere on my mac, so there must be some way to directly use them in boot2docker, right?
Use docker save to save the image to a tar file and docker load to load it back in your other vm.
You can also try docker-machine. Then use docker-machine env dev | source to access your docker images via the docker CLI.