Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions

Windows-10.0.19041WSL-2Ubuntu-18.04LTSdocker-19.03.13VisualStudioCode-1.49.3 Clean install Windows It's a good opportunity to note the installation procedure for VSCode with Docker on Ubuntu on WSL without Docker Desktop on Windows. I don't know if this is happy

Aiming figure

Extensions - VSCode Docker - VSCode

Install wsl2

Primary information

  1. PowerShell administrator

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

```powershell
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  1. Restart Windows

  2. PowerShell administrator

wsl --set-default-version 2


## Install Ubuntu 18.04 LTS
 1. Obtain, install and launch from [Microsoft Store](https://www.microsoft.com/store/apps/9N9TNGVNDL3Q)

## Install Docker
1. Install using the repository
 * [Primary information](https://docs.docker.com/engine/install/ubuntu/)

    ```bash
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
  1. Post-installation steps for Linux

sudo groupadd docker

```bash
sudo usermod -aG docker $USER
newgrp docker
  1. Configuring remote access with daemon.json

sudo vi /etc/docker/daemon.json


#### **`/etc/docker/daemon.json`**
```vim

{
"hosts": ["unix:///var/run/docker.sock", "tcp://127.0.0.1:2375"]
}
sudo service docker restart

Confirmation

$ docker --version
Docker version 19.03.13, build 4484c46d9d
$ sudo netstat -lntp | grep dockerd
tcp        0      0 127.0.0.1:2375          0.0.0.0:*               LISTEN      3973/dockerd

Install Visual Studio Code

that's all

Recommended Posts

Docker on Ubuntu18.04 on WSL2 and VSCode installation instructions
Docker installation on WSL2
Latest docker installation (Ubuntu 20.04 and Ubuntu 20.10)
Ruby installation on WSL2 + Ubuntu 20.04
Elmer / Ice installation (Ubuntu on WSL)
Try putting Docker in ubuntu on WSL
Until you put Ubuntu 20 on Windows 10 Home and WSL2 and run Docker
Docker installation on CentOS 6
Docker installation and initialization
ubuntu on wsl part 10
Easily build Redmine on Windows using WSL2 and Docker
WSL2 + VSCode + Docker development environment
Install Docker on Ubuntu Server 20.04
Oracle Java 8 on Docker Ubuntu
Install Java on WSL Ubuntu 18.04
[Note] Flow from docker installation to JupyterLab startup on ubuntu
Install docker and docker-compose on ubuntu in the shortest process
MongoDB installation and authentication settings (Ubuntu18.04)
Build Clang x VSCode on Docker (1)
Enable Java 8 and Java 11 SDKs on Ubuntu
Using Docker on Windows10 Home WSL2
Challenge to install WSL2 and docker
Installing and using Ansible on Ubuntu 16.04
Ubuntu on WSL2: Cannot connect to the Docker daemon at unix
Install Docker on Ubuntu and set up remote connection using tls
Windows Docker: Disk pressure on WSL files
Install docker and docker-compose on Alpine Linux
STS installation and Japanese localization on Windows 10
Run NordVPN on Docker (Windows) Ubuntu container
Use docker in proxy environment on ubuntu 20.04.1
Introducing Docker Desktop for Windows on WSL2
Docker installation
Introduced vscode with apt to docker: ubuntu
Put Zabbix in Ubuntu with Docker and monitor Docker on the same host
Use cljstyle with Spacemacs on Ubuntu on WSL2
Microservices 101-I tried putting Docker on Ubuntu-
Build Cakephp environment from docker installation Ubuntu
Until you run apache on ubuntu on docker
Run Ubuntu + ROS with Docker on Mac
Monitor the Docker container and SystemD process on the same host with Zabbix on Ubuntu.
Introducing a dark Jupyter Notebook with pyenv and Vim keybindings on Ubuntu on WSL 2
Docker on wsl2 no longer says yes or no
Fastest installation of Visual Studio Code on Ubuntu
Build and install Wireshark Development Release (3.3.1) on Ubuntu
Publish MySQL externally and log in on Ubuntu
Install Docker on Raspberry Pi 4 and Raspberry Pi OS 64bit
Protobuf and gRPC C ++ environment construction on Ubuntu 18.04
Kaggle environment construction using official Docker and vscode
Simple installation of nginx and Docker using ansible
Build a DHCP and NAT router on Ubuntu 16.04
Build Java x Spring x VSCode x Gradle on Docker (1)
I installed Docker on EC2 and started it
Set up an SSH server on WSL2 Ubuntu 20.04
Install and switch between multiple Javas on Ubuntu
WSL, Zsh, VSCode, Docker, NodeJS setup summary in 2020
Operate Docker Desktop for Windows on Linux (WSL)
On ubuntu, scilab, octave and R, sympy, etc.
JDBC operation check from xampp installation on Ubuntu
Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Liberty on Docker
Ssh to Ubuntu on VirtualBox on your Mac and do it until you install Docker