Member-only story
Creating a WSL 2 Distro from Scratch
2 min readFeb 23, 2020
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