Skip to content

Instantly share code, notes, and snippets.

@Ozahata
Last active July 7, 2018 13:49
Show Gist options
  • Save Ozahata/f7dd5ee15729d2b4bda66f98daae1009 to your computer and use it in GitHub Desktop.
Save Ozahata/f7dd5ee15729d2b4bda66f98daae1009 to your computer and use it in GitHub Desktop.
Windows 10 WSL Bash (docker)
# Install docker/docker-compose
## Source 1: https://medium.com/@praaveen/part-2-docker-ce-and-docker-compose-installation-with-ubuntu-ef7b16bd3531
## Source 2: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
## docker
lsb_release -a
export DOCKER_COMPOSE_VERSION=1.21.2
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
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 -y docker-ce
### Specify version
# sudo apt-get install docker-ce=<VERSION>
sudo usermod -aG docker $USER
## docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
# Package modification by apt fails on Linux Subsystem for Windows
## Source: https://github.com/docker/for-linux/issues/52
sudo mv /var/lib/dpkg/info/docker.* /tmp/
sudo dpkg --remove --force-remove-reinstreq docker.io
sudo apt-get remove docker.io
sudo apt-get autoremove && sudo apt-get autoclean
# Close the bash terminal and open a new one
sudo apt-get install docker-ce
# Using WSL and MobaXterm to Create a Linux Dev Environment on Windows
## Source: https://nickjanetakis.com/blog/using-wsl-and-mobaxterm-to-create-a-linux-dev-environment-on-windows
#.bashrc
export DISPLAY=:0
# Graphics
sudo apt-get install libgtk2.0
# Dropbox
apt-get install libxslt1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment