singularityhub/docker2singularity

Windows: Problem with creating singularity image

KrzysZG37 opened this issue · 9 comments

Using the following command:
docker run quay.io/singularity/docker2singularity -f <<container_name>>
I received the following output:
docker: error during connect: Post http://docker:2375/v1.39/containers/create: dial tcp: lookup docker on 192.168.65.1:53: no such host.

vsoch commented

What is the -f argument for? Have you tried running the same command for a different container (e.g., something like a base image?)

vsoch commented

Also, with docker2singularity you are going to need to follow the instructions in the README and bind all the necessary bits on your host. It won't work to just run.

vsoch commented

Based on this issue docker/for-mac#1827 and the output above, you are trying to interact with a private registry (using only http), one called docker on port 2375. It also looks like it's an address in France. https://whatismyipaddress.com/ip/92.168.65.1 I think maybe you have a configuration for a local or different registry?

vsoch commented

Just tested locally, interaction with Quay.io works okay from here:

$ docker pull quay.io/singularity/docker2singularity
Using default tag: latest
latest: Pulling from singularity/docker2singularity
[DEPRECATION NOTICE] registry v2 schema1 support will be removed in an upcoming release. Please contact admins of the quay.io registry NOW to avoid future disruption.
9d48c3bd43c5: Pull complete 
7f94eaf8af20: Pull complete 
9fe9984849c1: Pull complete 
e17f0ad88222: Downloading  5.897MB/48.56MB
e8bd20cf6e8a: Download complete 
dbbc603b9086: Download complete 
17443955f0b9: Download complete 
2c8319c69dce: Downloading  1.613MB/66.58MB
801f867a9682: Downloading  686.2kB/12.75MB
...

@vsoch

  1. -f argument refers to building image into sandbox directory
  2. I tried it on multiple containers, not only custom ones created by me, but also ubuntu, etc.
  3. I've succefully pulled this image using docker pull quay.io/singularity/docker2singularity, so this works fine

One remarks: i am using windows, but i have tested it on ubuntu as well

vsoch commented

The error I'm seeing is referencing another registry, something hosted in France. It does not look related to docker2singularity. If you want to run on your ubuntu, show me the exact command you use (with binds) then I can offer to help. Otherwise, I can't help with Windows, but I'd suggest googling that error.

Right now, i need to run it on windows. Probably the problem could be caused by docker.sock mount as it could be seen on the example in Readme.md file:

docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v /host/path/change/me:/output \
--privileged -t --rm \
quay.io/singularity/docker2singularity \
-w \
ubuntu:14.04

but i don't know what should i put as docker.sock reference

vsoch commented

I'm sorry I can't help you - I haven't used Windows in 10 years, definitely not for containers. I'd suggest you find someone that does, or try various suggestions in posts like this one https://stackoverflow.com/questions/36765138/bind-to-docker-socket-on-windows

Okay, i lead to working solution on linux, but windows probably has problem with supporting it.