1) - WSL

Install fresh WSL, you can follow this guide: https://learn.microsoft.com/en-us/windows/wsl/install

wsl --install

2) Docker:

As soon as you enter Ubuntu (WSL's default distro) you can install Docker Engine by following this guide: https://docs.docker.com/engine/install/ubuntu/

  • for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done

Add Docker's official GPG key:

sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg

Add the repository to Apt sources:

echo \"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

3) Portainer

Once you have restarted Ubuntu (possibly also WSL) you can install the portainer by following this guide: https://docs.portainer.io/start/install-ce/server/docker/linux

sudo docker volume create portainer_data docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

Previous Post Next Post

Docker setup on Windows using WSL