Last active
March 26, 2022 19:16
-
-
Save brosahay/c2cdbe38dff28d7a9432330962111d9c to your computer and use it in GitHub Desktop.
Docker on Ubuntu 20.04 LTS WSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Docker-CE | |
sudo apt update -y | |
sudo apt install docker-compose -y | |
# Add User to Group | |
sudo groupadd docker | |
sudo gpasswd -a $USER docker | |
newgrp docker | |
# Connect to Docker in running on native Windows | |
# Enable option Expose daemon on tcp://localhost:2375 without TLS | |
echo "export DOCKER_HOST=tcp://localhost:2375" >> ~/.bashrc && source ~/.bashrc | |
## CHECK INSTALL | |
# docker info | |
# docker-compose -version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/wsl.conf for Windows 18.03+ | |
# mounts at /c or /e instead of /mnt/c or /mnt/e. | |
[automount] | |
root = / | |
options = "metadata" |
Skipping Line#14
and adding the following option instead of exposing the daemon on tcp://localhost:2375
is working now. Tested it with Ubuntu 20.04 LTS on WSL2 (Windows 10).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works like a charm! Thank you @brosahay