Porting issue with Docker - macos

Hey I tried running the command
sudo docker run -d -P training/webapp python app.py"
from the tutorial but I keep getting the error
FATA[0000] Error response from daemon: Cannot start container.
I downloaded the image fine but the trouble occurs whenever I try to run it. I checked the port sudo docker port (name) and nothing shows up. I'm guessing the issue is that the PORTS aren't being set up properly. I have a mac and I'm using vmware with ubuntu and I downloaded the ubuntu set up for docker.
Is there anyway to fix this? Any help would be greatly appreciated.

Related

Fatal Error: Docker daemon failed to start with Docker Desktop

I'm on MacOS 12.1. I downloaded Docker Desktop from the Docker site, but when starting it, I always get the following error:
level=error msg="Handler for GET /v1.24/services returned error: This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again."
How can I resolve this problem? All the results I can find for this error already have the daemon started and working. I can't even get the daemon started. I haven't ever touched docker swarm.
Running any of the suggested commands fails because there is no running docker daemon.
Reseting to factory defaults does not resolve the issue.
Reinstalling Docker Desktop does not resolve the issue.
Reinstalling the Docker cli does not resolve the issue.
Restarting the machine does not resolve the issue.
What do I do to fix this issue?
What I ended up doing was uninstalling Homebrew. Apparently something there was causing issues, even though I didn't install Docker Desktop through brew, and made sure to uninstall all formulas that had anything to do with Docker. Exactly what caused this problem is a mystery still.
I had the same problem.
And I found this log is catched from ~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log
I try to restart Docker Desktop, but this log doesn't append any content. The strange thing is error Dialog display the same content, even time! Which means Docker Desktop never try to start docker daemon.
I try to close Wi-Fi, then Docker Desktop will start normally.
Check dockerd.log again, this print the same error with new time, but Docker Desktop running normally.
So I think there is some error relate Docker Desktop network process rather than docker daemon.
Additionally, maybe docker daemon printed this error because of network driver is overlay which require a swarm node.

Docker fails when run getting-started image

I installed the Docker Desktop Preview for M1 chipset's Mac. The installation was good and I didn't see any kind of error reported. However when I tried to run docker following the tutorial, I get the following error.
docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory
This is the command that show the error:
docker run -d -p 80:80 docker/getting-started
I don't know what I am missing, is there any way to fix this error? What is it due of?
EDIT: I fixed the issue running clean/purge the data. Now it seems to be working
See here, seems to be known issue: https://github.com/docker/for-mac/issues/5253

ImageMagick or GraphicsMagick can not be found

I have got Rocket.Chat up and running on Plesk Onyx (ubuntu 16.04.3) using the docker system by running these commands.
docker run --name db -d mongo:3.0 --smallfiles
docker run --name rocketchat --link db -d rocket.chat
Everything is working accept the Avatar Resize which is giving and error:
'The image resize will not work because we can not detect ImageMagick or GraphicsMagick installed on your server.'
I have both installed on the server but for some reason it's not being detected by Rocket.Chat.
Am I missing something?
The other issue I get is when I go into the docker settings I have to change Accounts_AvatarStorePath to ACCOUNTS_AVATARSOREPATH and remove Accounts_AvatarStorePath otherwize I get an error about lowercase letters.
Figured it out finally.
There seems to be an issue with that image, so switched to the other offical image and now all working.

docker-compose on mac (el capitan) extremely slow

I just erased the docker for mac program because it was very bloated, and I installed with brew docker and docker-compose. I followed this blog post.
docker works fine, but docker-compose is extremely slow.
I know that there is a fix of setting localunixsocket.local in the /etc/hosts file, but that doesnt work for me. I tried every combination, but nothing works.
These are the versions I'm using on el capitan:
docker
Docker version 17.11.0-ce, build 1caf76c
docker-compose
docker-compose version 1.17.1, build unknown
Tnx,
Tom
Try to put these aliases in your /env/hosts file, so your 127.0.0.1 line looks like this:
127.0.0.1 localhost localunixsocket localunixsocket.local localunixsocket.lan localunixsocket.localdomain

docker pull centos timeout on windows 8.1

When I run from command line
docker pull centos
I got timeout error. I have no proxy and try from different networks and stucked on this. What reason can be?
Since you wrote that you use Windows 8 I assume that you run boot2docker?
Can you first verify that you can connect to boot2docker itself? E.g. with docker ps? If you still get timeouts issuing that command, make sure boot2docker is running by typing boot2docker restart.
If you can connect to boot2docker without any problems and the docker pull centos problem remains then it seems you have other kind of networking problems on your site which block your connections.

Resources