Problem with Run the docker container in Win10

hello, i have problem with the installation for Win10 docker.

when i follow the docker/Readme in the repository, after i run the code in the Therminal:

sudo docker run -it -p 9000:8888 --mount src="$(pwd)",target=/commonroad/commonroad-search,type=bind gitlab.lrz.de:5005/tum-cps/commonroad-search:2022_AI

it return: “/usr/bin/sh: 1: sudo: not found”
or it return : “docker: invalid reference format” for run it in Ubuntu

and when i follow the linkhttps://commonroad.in.tum.de/forum/t/running-commonroad-search-with-docker-in-windows/331
after run this code in Powershell:

Get-Content .\commonroad_search_2021.dockerfile | docker build - -t commonroad-search:2021_AI

when i do have the dockerfile at the position C:\Users\1, it return:

e[31;1mGet-Content: e[31;1mCannot find path 'C:\Users\1\commonroad_search_2021.dockerfile' because it does not exist.e[0m
failed to get console mode for stdin: The handle is invalid.
[+] Building 0.1s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 31B                                                                                0.0s
 => [internal] load .dockerignore                                                                                  0.0s
 => => transferring context: 2B                                                                                    0.0s
failed to solve with frontend dockerfile.v0: failed to create LLB definition: the Dockerfile cannot be empty

or after run this code in Powershell:

docker run -it -p 9000:8888 --name commonroadsearch --mount src="$(pwd)",target=/commonroad/commonroad-search,type=bind commonroad-search:2021_AI

it return: “invalid argument “src=”$(pwd)”,target=/commonroad/commonroad-search,type=bind" for “–mount” flag: parse error on line 1, column 5: bare " in non-quoted-field"

what can i do? I cant just get start it :frowning:
thanks a lot when you can help me

Hi ge78zat,

Thank you for your question.

As to your problem about running docker on Win10, unfortunately I personlly don’t have a good answer at the moment and another tutor might will reply to your question later on. Maybe you could try to replace $(pwd) with %cd% and remove the sudo part at the beginning. You could check the newest README in repository for the complete command.

But the docker image should works well on Ubuntu (both on 18 and 20) if you follow the instruction in README. Please check the instruction carefully. If you still have problem with it, you could offer us more detail about it.

update: I have tried docker on Win 10 and if you modify the command as I posed, it should work.

Hope this could help you.

Best,
Mingxuan

Hallo,
i tried again and it works. thanks very much for help. I think the the error is because of my false spelling, it’s my ridiculous mistake.

Now i can open the http://localhost:9000/ in my Browser, but there is nothing in the folder “commonroad-search”. I think it is the same problem with the topic in this linkhttps://commonroad.in.tum.de/forum/t/win10-docker-installation-problem-no-file-in-jupyter-notebook/1026, and i need to clone the repo.
but by using the codegit clone https://gitlab.lrz.de/tum-cps/commonroad-search.git in the Terminal of Jupyter notebook of the localhost:9000, it returns fatal: destination path 'commonroad-search' already exists and is not an empty directory.
What should i do? Before this i have already cloned the repo in the localhost:8888 for the AIMA.
maybe i need to delete the empty folder “commonroad-search” in the localhost:9000 and clone one more time? thanks

Hi ge78zat,

from my experieince, yes, you could try to delete the empty folder and clone it again. Git itself cannot resolve it if there is a folder with the same name as the one you’d like to clone.

Here is how I open it:

  1. set up docker desktop;
  2. install git and reboot OS;
  3. in command prompt, config user.email and user.name with git (might not necessary)
  4. in command prompt, git clone (please try both option, for me, “clone with HTTPS” works )
  5. in command prompt, cd to the repository
  6. in command prompt, docker run and open localhost in browser.

Hope this will help you

Best
Mingxuan