I am trying to build docker image, but docker hangs forever during downloading image layers:
I tried this several times, and it just stops downloading at different points. I also tried docker-machine restart without any effect.
I am using docker machine on Mac OS X:
$ docker -v
Docker version 1.9.1, build a34a1d5
$ docker-machine -v
docker-machine version 0.5.5, build 02c4254
Any idea how to fix it?
I had a similar problem and I've switched from using Docker Toolbox to Docker For Mac and now it runs smoothly.
Here's a comparison: https://docs.docker.com/docker-for-mac/docker-toolbox/
Also make sure you have the latest Docker For Mac
Related
I have installed docker on windows 10.
Docker version:
Docker version 17.09.0-ce, build afdb6d4
I tried to pull latest ubuntu and ubuntu:16.04 using the bellow two commands
docker pull ubuntu
docker pull ubuntu:16.04
But I am getting the below error.
docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
no matching manifest for windows/amd64 in the manifest list entries
So is there any way to fix this issue?
You can't run linux images with a windows daemon.
If you are running Docker for Windows, it gives you the ability to switch between running a Windows Docker daemon and a Linux Docker daemon inside a hyper-v VM.
To run Linux workloads, make sure you have chosen "Switch to Linux Containers" in the Docker for Windows whale icon menu.
please follow the Docker tutorial here
In this case the problem is it requires adding the --experimental flag when starting dockerd.exe.
I am trying to update my docker related tools for macOS and I am unsure of how to go about it the following is my docker versions
Docker version 1.12.6, build 78d1802
docker-machine version 0.9.0, build 15fd4c7
docker-compose version 1.9.0, build 2585387
I do not use docker for mac and interact with docker via the command line. So my question is....How do I upgrade them individually or otherwise?
You can just use this link to download the new versiĆ³n of docker, docker-machine and toolbox https://download.docker.com/mac/stable/Docker.dmg And continue using docker-machine
I'm using a Mac, but I want to learn and use Ubuntu for development and I don't care about the GUI. I used to use Vagrant and ssh to the machine, but it consumes much of my machine resources. Can I use docker for the same purpose while also having the isolation (when I mess things up) of a VM?
First install Docker Desktop for Mac.
Then in a terminal window run: docker run -it --name ubuntu ubuntu:xenial bash
You are in a terminal with ubuntu and can do whatever you like.
Note: If you are using an ubuntu version bionic (18.04) or newer (ubuntu:bionic or ubuntu:latest), you
must run the command unminimize inside the container so the tools
for human interaction be installed.
To start again after a reboot:
docker start ubuntu
docker exec -it ubuntu bash
If you want save your changes:
docker commit ubuntu
docker images
See the unnamed image and:
docker tag <imageid> myubuntu
Then you can run another container using your new image.
docker run -it --name myubuntu myubuntu bash
Or replace the former
docker stop ubuntu
docker rm ubuntu
docker run -it --name ubuntu myubuntu bash
Hope it helps
This is one of the few scenarios I wouldn't use Docker for :)
Base images like Ubuntu are heavily stripped down versions of the full OS. The latest Ubuntu image doesn't have basic tools like ping and curl - that's a deliberate strategy from Canonical to minimise the size of the image, and therefore the attack vector. Typically you'd build an image to run a single app process in a container, you wouldn't SSH in and use ordinary dev tools, so they're not needed. That will make it hard for you to learn Ubuntu, because a lot of the core stuff isn't there.
On the Mac, the best VM tool I've used is Parallels - it manages to share CPU without hammering the battery. VirtualBox is good too, and for either of them you can install full Ubuntu Server from the ISO - 5GB disk and 1GB RAM allocation will be plenty if you're just looking around.
With any hypervisor you can pause VMs so they stop using resources, and checkpoint them to save the image so you can restore back to it later.
Yes, you can.
Try searching docker hub for ubuntu containers of your choice (version and who is supporting the image)
Most of them are very well documented on what was used to build it and also how to run and access/expose resources if needed.
Check the official one here: https://hub.docker.com/_/ubuntu/
The docker version is 0.10.0, the linux system is Centos6.5.
Three containers have been running in the system for 3 months in OpenStack. I put the nova-compute service in a container.
I found that nova-compute container didn't work recently.
I delete the json.log of the container when I found the log is 3GB,
but it still does not work.
I try to delete,stop,restart the container,restart the system,it's still the same.
dockerctl 6a82f22d2dad
lxc-attach:failed to get the init pid
docker rm -f 6a82f22d2dad
Error:
2015/08/11 08:51:32 Error:failed to remove one or more containers
docker stop 6a82f22d2dad
Error:failed to stop one or more containers
When running docker ps, the compute container works well.
Now I could not get other information because I can't connect the remote machine. Has anybody the same problem?
Redhat has come right out and stated that they do not support Docker on CentOS 6.x systems.
If you can, I suggest you upgrade to CentOS 7 and the latest Docker version.
You can find more info about CentOS 6.x Docker support here
I've installed docker on a VirtualBox running Fedora 20. I've been having problems getting hello-world to work, and eventually discovered that I can successfully run docker run hello-world only if I start docker on the command line with /usr/bin/docker -d. If I start docker with service docker start, any docker run command I try just hangs.
Why does service docker start not start docker in daemon mode, and how do I set up the other_args in /etc/sysconfig/docker to get it to do so?
Easiest way is just to remove docker and reinstall:
dnf remove docker
dnf install docker
Finally got it working. I removed docker, installed the latest version of virtualbox and the guest additions, upgraded Fedora 20 to 22, recreated loop devices because they got lost in the upgrade, rebooted countless times, and now service docker start starts up a version that docker run hello-world can run against successfully. It only took 2 days :-(