Docker Desktop can't get container logs - docker

I'm using Docker Desktop on Win10. Containers works correctly and when I start container without -d parameter I see logs in cosnole output. Also when I use command docker logs I can see the logs. Unluckily when I try to get logs from Docker Desktop Logs tab I see:
No such container: fb1c4bd5bc56031edb44e0c2e1e4ebd5c281f1a2d96bbc2b16249154e0c2d013
I tryed reinstall Docker Desktop but it doesn't help. This problem appeard a couple month ago , actually I have the newest (4.12.0) version.
Any ideas how to fix this?

Try deleting all execting containers and volumes with :
docker system prune
https://docs.docker.com/engine/reference/commandline/system_prune/
After that, reset your wsl distro.

Related

Docker port localhost:80 is always listened on

I am just studying the Docker and found out it seems that we don't need to run docker-tutorial image and the port:80 is always listened on just like below picture:
At first, I thought it is automatically managed by Docker Desktop. But it is not. Because after I close the Docker desktop completely, it is still there.
I even run a command to check the process of port 80 and no process is there:
when no process is on this port, it is still running. It drives me crazy. I do have followed docker start tutorial to run this tutorial web application and at that time I can also open localhost:80.
After that, I have stopped and removed container and even the image as well as closing the Docker app, the page, however, is still there.
Does any have encountered this situation or have any idea? How does Docker do this?
After a day, i start my mac again without running Docker and it is still there in a messy way:
By the looks of the page, it is running off the browser cache. Clear the cache or open an incognito window to use the newly created services on port 80.
Try stopping the container. E.g.
List running containers.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4b223e7cc8c5 docker/getting-started "/docker-entrypoint.…" About a minute ago Up About a minute 0.0.0.0:80->80/tcp wonderful_goldstine
Stopping the docker/getting-started container with its container ID.
$ docker stop 4b223e7cc8c5
4b223e7cc8c5
At this point, the container will have stopped and port 80 will be free. It will still be on your machine if you ever want to restart it, but you can remove it with:
$ docker rm 4b223e7cc8c5
4b223e7cc8c5
I had the same issue but in my case it' was just a cache in the browser. After stopping the docker image or deleted it, it will work probably
For stop it.
$ docker stop [CONTAINER ID]
for delete it
$ docker rm [CONTAINER ID]

Containers start with docker-compose up, are listed with docker ps, then don't appear with docker-compose

I've got an issue on ubuntu 18.04 where occasionally running docker-compose up results in the containers starting, the networking between them behaving as expected yet according to docker-compose they aren't there.
docker ps shows the containers exist.
UPDATE: after some comments:
docker-compose ps shows nothing. Also, the problem is intermittent meaning any example is hard to come by unfortunately.
Do you see them in docker ps -a ? You should add docker-compose -d up for detached mode.
Try running
docker-compose ps
from where your .yml file is located. It will show you the list of all docker containers generated from that .yml file

Running docker -ps returns an empty list although containers are running

I installed docker CE version on an ubuntu 18.04 server. Then, I installed a new jenkins container and everything worked well for two weeks.
After two weeks, for some reason, when I run docker ps I receive an empty list although the jenkins container is running and functioning (it worked in the past). I also tried to run docker ps -a, docker images and again, everything is empty. Also tried restarting the server and still every time the list is empty.
I then uninstalled and reinstalled docker and right after the installation, when running docker ps I see the containers....I thought that the problem was fixed, but today it happened to me again and I still see an empty list when running docker ps. Any ideas ? it will be much appreciated.
Run the command sudo service docker stop
After that find the process dockerd
ps aux | grep "dockerd"
and kill the one by
sudo kill {paste_dockerd_pid_here} -9
Start docker service
sudo service docker start

Docker now giving an error after updating

After using Docker for almost two months, today I got the following error:
C:\Users\dell>docker --version
Docker version 17.06.0-ce, build 02c1d87
C:\Users\dell>docker ps -a
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.30/containers/json?all=1:
open //./pipe/docker_engine: The system cannot find the file
specified. In the default daemon configuration on Windows, the docker
client must be run elevated to connect. This error may also indicate
that the docker daemon is not running.
Yes, the daemon is running, or at least it is shown as running under Services. I use it only with a local container and do not do anything remote.
Any suggestions on how this can be solved?
Well, I have had the same issue today and the only way for me to fix it was by reinstalling Docker (uninstall and install latest stable version)...
Now docker info runs OK and my solution builds again.
I hope it helps,
Juan
Note: it shouldn't have happened at all, I've lost at least one hour trying to figure out what and why it crashed...
Is Hyper-V running? You will get this error if Hyper-V closes down. Docker for Windows will still be "running", but the daemon will not work.

Can't remove or stop a container

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

Resources