0% found this document useful (0 votes)
46 views10 pages

WSL Ang

This document outlines the procedure for creating virtual machines using Ubuntu and installing Docker Compose on WSL2 for Windows 11. It includes steps for removing WSL2 distributions, installing Docker without Docker Desktop, starting the Docker service, and checking the installation. Additionally, it provides instructions for installing Docker Compose and accessing various local services through a web browser.

Uploaded by

janenguyenyt1999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views10 pages

WSL Ang

This document outlines the procedure for creating virtual machines using Ubuntu and installing Docker Compose on WSL2 for Windows 11. It includes steps for removing WSL2 distributions, installing Docker without Docker Desktop, starting the Docker service, and checking the installation. Additionally, it provides instructions for installing Docker Compose and accessing various local services through a web browser.

Uploaded by

janenguyenyt1999
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Procedure creation machines virtual (Ubuntu) and docker

compose installation on WSL2 for Windows 11

Removing WSL2 distribution

 Stop WSL: Open PowerShell or Command Prompt as administrator and type:

bash
Copy code
wsl – shutdown
 Check installed distributions: Enter the command:
bash
Copy code
wsl -l -v

This will show you a list of installed WSL distributions.

 Remove Distribution: To remove a specific distribution, type:

bash
Copy code
wsl -- unregister <distribution_name>

Replace <distribution_name> with the name of the distribution you want to remove .

 Verify deletion: Re-enter:

bash
Copy code
wsl -l -v

do : apt update and upgrade

To install Docker on WSL2 (Windows Subsystem for Linux), follow these steps:

To install Docker on WSL2 without using Docker Desktop, follow these steps:

1. Install WSL2

If you haven't already, make sure you have WSL2 installed. Open PowerShell as administrator
and run:

wsl - install
IPv4 address for eth0: 172.26.206.121
Log and pass: kor321
Make sure your WSL settings are configured to version 2:

wsl --set- default -version 2

2. Install Linux distribution

If you don't already have a Linux distribution installed, you can do so through the Microsoft
Store (e.g. Ubuntu ).
3. Install Docker in WSL2

1. Open a WSL terminal (e.g. Ubuntu ) and update packages:

sudo apt update


sudo apt Upgrading
2. Install required packages:

sudo apt install apt -transport- https ca- certificates curl software-
properties – common

3. Add Docker GPG key :

curl - fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt


key add –

4. Add Docker repository :

sudo add-apt-repository " deb [ arch =amd64]


https://download.docker.com/linux/ubuntu $( lsb_release - cs ) stable
"
5. Install Docker :

sudo apt update

sudo apt install docker -ce


Docker Setup and Launch

1. Start the Docker service : Docker in WSL2 does not have a systemd service , so start it
manually:

sudo service docker start

2. Add the user to the docker group so you don't have to use sudo for every command:

sudo usermod - aG docker $USER

After executing this command, close the terminal and reopen it for the changes to take
effect.

5. Checking the installation

To check if Docker is installed correctly, type:

docker –version

You can also run a test container:

docker run hello world


6. Install Docker Compose (optional)

If you want to use Docker Compose , install it by executing the following commands in the
WSL terminal:

1. Download Docker Compose :

sudo curl -L
"https://github.com/docker/compose/releases/latest/download/docker-
compose-$(uname -s)-$( uname -m)" -o / usr / local /bin/ docker-
compose

2. Granting executable permissions :

sudo chmod +x / usr / local /bin/ docker-compose

3. Check installation :

docker-compose –version

Installing npm the appropriate version

npm install -g npm@5

and node,js
nano docker-compose.yml
To open this tab: open browser -> type localhost:1880

To open this tab: open browser -> type localhost:8080


To login:
email: cinekadrych@gmail.com
password: 1234

To open this tab: open browser -> type: http://localhost:8087/#/


To login:
admin: guest
password: guest

You might also like