swri-robotics / bag-database

A server that catalogs bag files and provides a web-based UI for accessing them.
Other
344 stars 71 forks source link

Can't get running script with Docker-Compose "Without Authentication" #147

Open Thehkart opened 3 years ago

Thehkart commented 3 years ago

So i recently got into dockers and bag-files because of my work. We were looking for a way to store Bag files and this system was very promissing. But i ran into the Problem that i can't get Scripts to work in my docker.

image

Upper script is used to test if everything works fine. But I get this error Message: image

It is also to mention that I am using Windows 10 as my OS. Because of that I had to change the path for the Deamon in the Registry version into following:

I tried this because i hoped to get it running with this version because there was a Docker Image set to use in the Script Properties.

I hope there is some help because I'm going crazy as I don't understand how to solve this issue.

pjreed commented 3 years ago

I think that the error is probably because you are using this as the docker image: swrirobotics/bag-database:8080/ros:melodic

Docker expects that everything before the first / is a valid hostname and everything after that is an image tag; so in this case, it would be trying to connect to a host name swrirobotics and getting an image tagged with bag-database:8080/ros:melodic, but that is not a valid tag name, and so Docker is returning the error message invalid reference format.

To make sure everything is working, try first using an image just named ros:melodic, which will pull it from the official Docker hub. If you need to host docker images on a private registry, check the "With a Private Registry" page in the documentation for information on how to configure that.

Thehkart commented 3 years ago

First thanks for your reply and the explanation of the error :)

Oh yeah when I run ros:melodic as a container and use it as the docker:image everything is working fine for the example script.

If I use the docker-compose.yml with: ./daemon.json:/ProgramData/docker/config/daemon.json

and use the command "docker-compose up" i get following: image

Has it something to do with Windows or am I missing on something important?

pjreed commented 3 years ago

Actually, I think that might be a problem in the example configuration. The registry service expects to find a volume named registry; try modifying the volumes: section at the bottom of your docker-compose.yml file and add a line that says registry: to create a shared volume with that name.

Thehkart commented 3 years ago

Ok this seems to work. Also the example script is working fine when I use "ros:melodic" as the docker image unlike in the example with "registry:5000/ros:melodic".

If I use it like the example i get following output in the logs: image

like it's unable to connect to the host "registry". But I did change the deamon file and I am referencing it like in the comment before.

Thehkart commented 3 years ago

So a little update to my problem. I don't get the timeout anymore. But I am unable to use the registry:5000/ros:melodic as a docker image. The resulting error image looks something like this: image

I already updated the insecure-registries in my docker gui: image

Also in the local daemon.json image

and in the docker-compose.yml I got following: image

but apparently my "dockerd" command isn't running. I try to use it in my powershell but I only get error messages

pjreed commented 3 years ago

That looks reasonable; could you upload the contents of your docker-compose.yml file and also the contents of the log file from when you run docker-compose up?

Thehkart commented 3 years ago

The docker-compose.yml looks like: version: '3.6' services: docker: image: docker:dind privileged: yes networks:

And the logs after running docker-compose up. I hope this helpts

Logs Logs_2 Logs_3 Logs_4 Logs_5

pjreed commented 3 years ago

One thing that sticks out to me as being a little strange here is I don't see any entries in the log file for the registry_1 container, and I would expect it to print something even if it failed. Does docker ps -a list a container named bag-database_registry_1? If so, what does it print when you run docker logs bag-database_registry_1?

Thehkart commented 3 years ago

Yes. The registry is listed For the question how the logs look like:

image