Installed a docker image in ubuntu WSL

Installed a docker image in ubuntu WSL
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | sudo gpg --dearmor --yes -o /usr/share/keyrings/docker-archive-keyring.gpg
sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg
sudo apt-get update
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get install docker-ce docker-ce-cli containerd.io

Open another termial and enter:
sudo docker pull ubuntu
sudo docker run -it ubuntu bash

Now we are in the docker environment.
apt-get update
apt-get upgrade
cd home
mkdir Applications
cd Applications

Next, we should install vscode.
apt update
apt upgrade -y
apt install software-properties-common apt-transport-https wget

Then, use wget to import Microsoft’s GPG key:
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | apt-key add –
add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
apt install code

To update your existing VS Code version to the newest available version, run the update/upgrade commands in this manner:
apt update && apt upgrade -y

Start code (This part is optional):
cd ./usr/share/code/bin
apt-get install libasound2
code . --user-data-dir

Add permission (important):
sudo usermod -aG docker $USER

reboot

Check which docker containers are currently available.
docker ps -a

View mirrors in local libraries:
docker images

Load a docker iamge:
docker attach 9876cf575996

To export an image from a library to a hard disk:
docker save -o /tmp/vsc-net-ns_3-f4bc01a3a1c046f51af007cd29877ab2:latest.tar vsc-net-ns_3-f4bc01a3a1c046f51af007cd29877ab2:latest