- Have Windows 10 Insiders 18305 minimum
- It will work in the Windows 10 1903 release (no Insider need)
- Have a WSL store distro installed
- Have Porter installed
- Have the
docker cli
installed on WSL- You can also work with
docker.exe
directly by setting the variableDOCKER_SOURCE=docker.exe
- You can also work with
- The path of both
DISTRO_SOURCE
andDISTRO_PATH
must be on the Windows filesystem (/mnt/c/...)- In my config, I created a symlink
/github
to/mnt/c/github
- In my config, I created a symlink
The only limitation here is: the distro needs to be in a container registry (read for 99%: https://hub.docker.com)
Test online
- If you only want to try it out with Alpine you can also run:
curl https://raw.githubusercontent.com/nunix/wslcnab/master/cnab-setenv.sh | bash -s install
Run offline
- Clone the repository:
git clone https://github.com/nunix/wslcnab.git
- Modify the values in
cnab-setenv.sh
script:DISTRO_IMAGE
: name of the container image and the version can be added:export DOCKER_IMAGE=ubuntu:19.04
DISTRO_NAME
: name of your distro, MUST BE UNIQUE, which will be listed/called bywsl.exe
- Install a new distro
./cnab-setenv.sh install
- Uninstall your distro
./cnab-setenv.sh uninstall
Enjoy!