Member-only story

Creating a WSL 2 Distro from Scratch

βš— Kevin Summersill πŸ”‹
2 min readFeb 23, 2020

--

Image Source: https://devblogs.microsoft.com/commandline/new-distros-coming-to-bashwsl-via-windows-store/

This article will cover how to set up a WSL 2 Distro using Docker. So let's begin. The docker container that we will be creating is to be able to run Podman on a windows machine. We will then convert this Distro into a usable WSL on the window.

Step 1. Creating the Docker Container. We will first build the docker container by scripting a Dockerfile.

Create a new directory

mkdir centos-server-podmancd centos-server-podmantouch Dockerfile

Step 2. Open the β€œDockerfile” and script the following:

FROM centos:8RUN yum update -yRUN yum install -y nano dnf-plugins-coreRUN dnf config-manager --set-enabled PowerTools -yRUN dnf -y updateRUN dnf module list | grep container-toolsRUN dnf install -y @container-tools --skip-brokenRUN podman versionRUN yum install -y pinentry wgetRUN curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectlRUN chmod +x ./kubectl

--

--

βš— Kevin Summersill πŸ”‹
βš— Kevin Summersill πŸ”‹

Written by βš— Kevin Summersill πŸ”‹

Enterprise Solution Architect | Certified K8s Administrator/Developer βš“ | SAFe SPC | Cert Terraform | AWS Solutions Architect | Dev*Ops/GitOps Engineer πŸ”₯

No responses yet