Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n-murray/wsl-automated-setup
The WSL automated setup project is designed to make creating your own WSL distro using a combination of Dockerfiles and scripts.
https://github.com/n-murray/wsl-automated-setup
docker dockerfile windows wsl
Last synced: about 1 month ago
JSON representation
The WSL automated setup project is designed to make creating your own WSL distro using a combination of Dockerfiles and scripts.
- Host: GitHub
- URL: https://github.com/n-murray/wsl-automated-setup
- Owner: n-murray
- License: gpl-3.0
- Created: 2021-12-29T14:32:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-13T21:19:30.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:15:55.167Z (5 months ago)
- Topics: docker, dockerfile, windows, wsl
- Language: Shell
- Homepage:
- Size: 2.7 MB
- Stars: 14
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - n-murray/wsl-automated-setup - The WSL automated setup project is designed to make creating your own WSL distro using a combination of Dockerfiles and scripts. (Shell)
README
# WSL Automated Setup
The WSL Automated Setup project is a set of scripts that can make the installation and creation of custom distros for WSL a simple process. It allows a user to create a custom WSL install and tear it down again when no longer needed or broken.The purpose of the scripts in this repo are to make the creation of development ready WSL distros easy by
automating the creation of a custom distro using Docker containers.
___
## Installation Instructions> ### Prerequisites
> For the installation you will need the following:
> - Git (If cloning the repository)**Docker Desktop is now optional**
If not installed a minimal Alpine Linux distro will be installed and act as a builder which will install Docker and create our distro.
Once installation is complete the builder distro is removed.___
### If WSL is enabled already
If you have got WSL and WSL2 enabled already on your computer and you have Docker Desktop installed you simply
need to run the ***"build_environment.bat"*** file in this folder. This script will build a Docker container using a
Dockerfile which installs the required applications for development eg... Java, Maven, Python and Docker. ***If the tar file "dev-env.tar.gz" already exists from previous runs it will be used instead of recreating it.***If for whatever reason you want to remove the installed WSL distro you can run the ***"remove_environment.bat"***
which will remove the distro and the network configurations. To re-install the custom WSL distro again just
re-run the build_environment.bat and it will install a fresh distro.
___
### If WSL is not already enabled on your computer
If you have not got WSL enabled and you are using Windows 10 version 2004 or higher you can install WSL by simply running the following command in an administrator Powershell or Command Prompt window.```
wsl --install
```This command will enable all of the required components, download the latest Linux kernel and set WSL 2 as your default while also installing Ubuntu by default.
***For more information check the official documentation below***
> https://docs.microsoft.com/en-us/windows/wsl/install
___
If you have an older version of Windows 10 you can enable WSL by running the scripts found in the "Initial WSL install scripts" folder.
These scripts will enable the required features and download the required kernel update for WSL2 and install it.
The commands in these scripts are from the official Microsoft installation guide: https://docs.microsoft.com/en-us/windows/wsl/install-win10
I have just automated the instructions using batch files, however you can just follow that guide if
you would prefer not to run them.### Brief Script Expalanation:
enable-wsl2-part1.bat:
This script enables the WSL and Virtual machine platform optional Windows features that are
needed to run WSL and WSL2enable-wsl2-part2.bat: This script downloads the Linux kernel update installer required for
running WSL2, it then runs the installer.
___
***Windows 11***
> For Windows 11 you can install WSL from the Microsoft Store. Currently in preview here: https://www.microsoft.com/store/productId/9P9TQF7MRM4R
___