Skip to content

Latest commit

 

History

History
88 lines (63 loc) · 2.26 KB

README.md

File metadata and controls

88 lines (63 loc) · 2.26 KB

Welcome to WSLD!

This program was created with the intention of sharing and installing WSL machines more easily!
It allows you to grab any dockerhub image and install it as a WSL subsystem or WSL2 Virtual machine.

To login docker you can use:
wsld.exe docker -l -u user -p password
this allows you to install private repos!

Requirements

  1. WSL 2 Installed
  2. A default WSL image

Persistent accounts when importing docker images

When you import an image to WSL, usually, the root user is the default user. If you want to change this behaviour, and have it persistent when you upload your images into docker hub, (or export it manually) you must create a file:

/etc/wsl.conf

with the content:

[user]
default=<username default account>

With this, when you upload and reimport an image, the default user configuration will be stored.

Usage

The usual command you want to do is:
wsld.exe -d <distroname> -i <dockerimage>
-d and -i are the only required arguments.
distroname is the name which will be registered to WSL.
dockerimage is the usual <repository/name:tag>, as if you were to do a docker pull.

Some examples are:
wsld.exe -d debian_d -i debian
wsld.exe -d qemu_d -i tianon/qemu

  wsld [OPTION...]

  -d, --distro arg    Name to give the new distro
  -i, --image arg     Docker Image name
  -r, --remove arg    Distro name to remove
  -l, --login         Try to login docker
  -o, --onto          Select installation dir
  -u, --user arg      Docker username
  -p, --password arg  Docker password
  -v, --verbose       Verbose output
  -t, --transfer      if you logged in into docker, you can upload an wsl image to docker using -d -i as inputs

Obtaining access to the installed image

The usual "wsl" command can log into any installed distribution,
so if we installed a debian image as "debian_d", we just need to do the following command:
wsl -d debian_d

Also, check if the image has been installed with the command:
wsl -l -v

This command will show you all the installed distributions and its versions.

This program is free to use, but if you want to invite me to a coffee, feel free :)
https://www.paypal.me/rucadi

I plan on rewriting the code in a near future.