Open Thehkart opened 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.
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:
Has it something to do with Windows or am I missing on something important?
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.
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:
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.
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:
I already updated the insecure-registries in my docker gui:
Also in the local daemon.json
and in the docker-compose.yml I got following:
but apparently my "dockerd" command isn't running. I try to use it in my powershell but I only get error messages
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
?
The docker-compose.yml
looks like:
version: '3.6'
services:
docker:
image: docker:dind
privileged: yes
networks:
# Be careful about allowing anything else to access this service!
registry: image: registry:2 networks:
# SQL client to perform operations on it. If you don't need to do so, this
# port does not need to be exposed.
environment:
POSTGRES_PASSWORD: letmein # If you do expose it, it's a good idea to change this password to something more secure.
POSTGRES_USER: bag_database
POSTGRES_DB: bag_database
networks: bagdb: {} volumes: bags: driver: local driver_opts: type: 'none' o: 'bind' device: '/var/local/bags' # Replace this with the bath to your bags docker_cache: postgres: ldap: slapd: indexes: registry: scripts: driver_opts: type: 'tmpfs' device: 'tmpfs'
And the logs after running docker-compose up
. I hope this helpts
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
?
Yes. The registry is listed For the question how the logs look like:
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.
Upper script is used to test if everything works fine. But I get this error Message:
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.