Coder Social home page Coder Social logo

simhaonline / wsld Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rucadi/wsld

0.0 1.0 0.0 103 KB

WSLD is a tool for downloading and installing docker images into WSL1 or WSL2 directly. It also supports uploading WSL images into Docker Hub.

License: GNU General Public License v3.0

C# 100.00%

wsld's Introduction

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.

New

Now it accepts uploading images to dockerhub too!!

Give it a try:

This next command will upload the installed distro "debian" into my dockerhub repository rucadi.
wsld.exe docker upload -d debian -i rucadi/debian:latest

To login you can use:
wsld.exe docker login -u user -p password

This accepts no parameters, in that case, you must pass them iteratively.

If you try to use a command that requires login, you will be prompted with the login dialog.

Build your own Dockerfiles!

With this feature, you can build you own images for WSL from Dockerfiles.
wsld.exe docker build -d wsl_distro_name

There are more parameters! check the help!

Example

Go into asciinema to see how it works!
https://asciinema.org/a/EaGqIVG9IbWJ6iSw70Sl7eQha

Requirements

  1. WSL Installed, either 1 or 2.
  2. A default WSL image (when doing bash) that has tar installed.
  3. Tested in windows build 18922, you need an upgraded "wsl" to work. If you do wsl -l -v and it works, you are good to go.

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

Also, optionally, you can pass the version (1 for WSL1 and 2 for WSL2) or the installation directory of the WSL image.

If there is no version, it will take the default for your wsl installation.

  -o, --directory     Directory to install.

  -i, --image         Required. Docker Image to Install.

  -d, --distroname    Required. Name to give to the new distro.

  -v, --version       Version for the new distro, the default is the wsl default, set 1 to WSL1, 2 to WSL2.

  --help              Display this help screen.

  --version           Display version information.

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

wsld's People

Contributors

danstis avatar rucadi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.