Linux/Docker/Installation

From Wiki

Installation on Ubuntu

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 update
apt-cache policy docker-ce
sudo apt install docker-ce

sudo systemctl status docker


  • Set different docker root dir:
vi /etc/systemd/system/docker.service.d/docker.root.conf

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -g /srv/docker-lib -H fd://

Installation on Windows, control from WSL

  • Install Docker for Windows
  • Settings: Expose daemon without TLS
  • WSL:
    • Follow "Installation on Ubuntu" instructions from above
    • echo "export DOCKER_HOST=localhost:2375" >> ~/.bash_profile

Docker compose installation on Ubuntu

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