# Docker on Windows

# Install Docker on Windows local machines

From what I can tell, Docker and PowerShell runs together to get Docker containers running.

### Step 1

First up is to make sure that virtualization is enabled in the bios. Do that now.

...I'm waiting...

#### install WSL (Windows Subsystem for Linux)

[Documentation here](https://learn.microsoft.com/en-us/windows/wsl/install)

Now, install WSL using PowerShell

```powershell
wsl --install
```

To see a list of available Linux distributions available for download through the online store, enter:

```powershell
 wsl --list --online
```

To change the distribution installed, enter: `wsl --install -d <Distribution Name>`

```powershell
 wsl --install -d Ubuntu
```

#### You should now have a live Ubunu intense running. 

You can now roam around Linux like a bad boy but, you can just leave it along for now because, you dont need it yet.

### Install Docker

[Download docker here](https://docs.docker.com/desktop/setup/install/windows-install/) and then, install it.

Note: It might make u restart or, log out from here. Close all your shee-it and... do it. when you log back into windows, it should open up to the newly installed window for docker.

Now you are done and can do what you want it it. Start a new [docker compose and run it?](https://wiki.danicus.net/books/docker-on-windows/page/run-container-in-docker-docker-compose "Run Container in Docker / Docker Compose")

# Run Container in Docker / Docker Compose

If you haven't already, you will need to have[ Docker Desktop](https://wiki.danicus.net/books/docker-on-windows/page/install-docker-on-windows-local-machines "Install Docker on local drive") an WSL installed. PowerShell and Docker will run side by side.

### Run your Docker container using Docker Compose.

have Docker up and running. Also, pull up PowerShell.

In PowerShell, navigate to where you store your docker compose .yml file. If you dont have one yet, build it.

Run the file in Powershell

```powershell
docker-compose up -d 
```

In just a moment after you run the file, you should see your docker.desktop has the a running container.

YOUR DONE! I hope... have fun.