While working on docker on windows following official documentation.
I ran the standard image hello-world and it worked fine first time and also tried other images as per tutorial(python program of hello world).
But after few days when I am trying to run those images again its not running giving no output on console.
It will be great if you could also suggest me where to look for logs for whats happening in background.
Following are the commands which I am using.
- docker images ls
- docker run hello-world
I restarted system and every image started executing.
Still dont know exact error which resulted in this situation.
Please suggest where to look for logs in case you know.
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
So, I pulled the ros container from docker hub, using
docker pull ros
which got me the latest docker 'foxy' version.
I proceeded with the tutorial on starting the docker container of ROS. I could successfully start the container and connect to it. It's a small little tutorial. Nothing long nor complicated.
The penultimate step in that tutorial asks for sourcing gthe setup.bash file, which I did and received no errors. (Actually nothing at all. Neither success, nor failure came up).
source /opt/ros/<distro>/setup.bash
And after that, to taste the sweet fruit of my hard labour I entered the final command (as mentioned in the tutorial),
rostopic list
which returned to my surprise,
rostopic command not found
I proceeded then to enter at the terminal roscore, roscd, etc and none of them worked. All of them were not found.
I did try to just run that setup script myself, from the terminal without using source, like:
$ /opt/ros/foxy/setup.bash
(after changing the permissions of course), which brought little change to the situation.
I looked in at the docker page for ros and nothing helpful was to be found there. Plenty of instructions there about how to build my own docker image for ROS, but that is not what I want to do right now, I guess.
I googled and the hits on the first page were:
this (the original tutorial which I am anyways following),
this (something general about docker)
and,
this (about how to
run GUI with Docker - not there yet frankly),
which begs the question, what good is the container if I have to install everything myself anyways by following their other tutorial?
Or do I not understand something here? If someone could throw some light on it, it would be much appreciated.
Your container has ROS2, not ROS1. Try
ros2 topic list
If you want to get the ROS1 version instead, try pulling and running a different image instead:
docker pull ros:noetic-robot
docker run ros:noetic-robot
Context
The tutorial you are following was written some time ago, when the default container used ROS1. The new latest container uses ROS2 (in your case, Foxy). ROS2 doesn't have the same command names. rostopic does not work, and there isn't even a master, so roscore would make no sense!
The good news is, the tutorial page is a wiki, so I've already updated it to make it (at least slightly) clearer. If you have ideas for how to improve it, you could also make an account and do so.
Simple question: After using Docker for about a week, my docker build command gets bogged down and hangs (before anything executes) for about a minute. After staying in this hanging state, it will execute the docker build command with no issues at all and at at the expected speed.
Other Docker commands (like docker run) do not suffer from this "hanging" issue.
Docker Installation info:
Version 18.06.1-ce-win73
Channel: stable
Things I have tried:
docker system prune - This does clear up space, but doesn't speed up my docker build command
Reinstalling Docker on my machine - This does fix the issue, but it reappeared after about a week of using Docker again.
Does anyone else suffer from this issue?
I had the same issue. I solved it moving the Dockerfile to an empty folder, then I executed the docker build command and worked perfectly.
On some other forums people created a .dockerignore file including the any call to git and many other files, but that approach didn't work for me.
Here was the the issue:
The very first line of my Dockerfile (the FROM command) was failing. The "hanging" was caused by a timeout during the attempt to download the base image. I was attempting to download the base image from a location that I needed to set a proxy on my machine for.
So I was mistaken in my original post: The Docker build command wasn't running as expected. It was failing to download the base image due to a missing proxy setting.
2 reasons:
1.If you are building many dockers for hours ..please restart your router if possible as sometimes due to heavy data packets movement the router collapses.
2.Increase RAM ,CPU and Swap of docker engine and restart docker and try to build again.
I run our integration tests using testcafe 23.0 in docker. However, the tests often take a long time to start. I recorded the browser and it seems to take a very long time to do nothing:
https://youtu.be/9W6VosNMbhg
It takes 2 minutes to load the page. However, this is instant on my desktop.
How would I start to figure out this problem?
I figured out that that the testcafe proxy was being slowed down. After some limited success with passing --no-proxy-server to chrome, I made the networking in docker more permissive, and that stopped the slowdown.
You can use command option -d, --debug-mode # and docker you can use
docker logs --follow ContainerName/ContainerID, you can find how to work docker log here
You can find error log because slow you docker container
I played around with Docker and followed this Tutorial.
Using the docker functionality in Plesk, I pulled my created container from docker hub and ran it. When trying to remove it again, it threw an error message, which I didnt capture (didnt expected anything strange at that point). Then, when going back to the container overview it gave me the screen shown below.
Now, the container in the middle is mine (get-started), however, where the hell did angry_kare and peaceful_haibt come from?
Thank you guys for any answers or ideas! :)
(Im am currently not able to reproduce this :/)
Random containers spawned
When you run the container without a name. Docker will create containers with random names. The two containers which your having are the previously failed containers.