- Running image
docker run -t ubuntu-wsl:1.1.0 bash
- Export container as tar file
docker export --output ubuntu-wsl-1.1.0.tar $(docker ps -a --format "{{.Names}}")
- Import tar file
wsl --import "Ubuntu-WSL-1.1.0" C:\\Users\\rob\\Ubuntu-WSL-1.1.0 .\\ubuntu-wsl-1.1.0.tar
- Install tar file
wsl install -d Ubuntu-WSL-1.1.0
NOTE: all steps can be done with docker Desktop
To obtain the image there are 2 ways
Build image
docker build --file Dockerfile . --tag ubuntu-wsl:1.1.0
NOTE: is possible build image starting from own Dockerfile
Pull image
docker pull ghcr.io/robertonav20/customized-wsl-image/ubuntu-wsl:1.1.0
- Login Github Registry
echo "YOUR_PASSWORD" | docker login ghcr.io --username YOUR_USERNAME --password-stdin
- Push Github Registry
docker tag ubuntu-wsl:1.1.0 ghcr.io/robertonav20/customized-wsl-image/ubuntu-wsl:1.1.0
docker push ghcr.io/robertonav20/customized-wsl-image/ubuntu-wsl:1.1.0
- Login Github Registry
echo "YOUR_PASSWORD" | docker login docker.io --username YOUR_USERNAME --password-stdin
- Push Docker Registry
docker tag ubuntu-wsl:1.1.0 docker.io/robnav24241/customized-wsl-image:1.1.0
docker push docker.io/robnav24241/customized-wsl-image:1.1.0