redcode-labs / easyWSL

Create WSL distros based on Docker Images.
Other
555 stars 37 forks source link

docker run command #12

Closed NinjaKittn closed 3 years ago

NinjaKittn commented 3 years ago

How do I start a WSL Docker Container with specifc run commands e.g. --publish?

unrooted commented 3 years ago

Our usage of Docker in easyWSL project is limited only to grab tarballs from Docker Hub. You can't use Docker-specific stuff with easyWSL, because easyWSL is for WSL, not the Docker itself. It may sound as a con, but in fact, you no longer need to have Docker installed and running to use an already made Docker image which is on Docker Hub. BUT: you can tinker a little more and make a tarball from your local Docker image, and with a bit of tinkering, you should be able to use that as a WSL distro using WSL import capabilities. Or you can just push it to the Docker Hub as well and use easyWSL to grab it and register as WSL distro.

NinjaKittn commented 3 years ago

Thanks for the advice. This is all new for me. Is there any documentation how to do this in general?

unrooted commented 3 years ago

Basically we get layer or several layers from Docker Hub and combine those into one single install.tar file which can be easily imported into WSL, if you want to get the .tar file from your local Docker container, then you might want to check the following:

If you get lost, I recommend reading Docker Docs, and if you get lost with what options WSL gives you, you can always run wsl --help, this will list you what you can do with WSL and you might get the most interest around --import option, as we ourselves do.