Skip to content

Instantly share code, notes, and snippets.

@saiyam1814
Created February 1, 2018 10:48
Show Gist options
  • Save saiyam1814/4eed7495b2df385b24037661d5bb89b9 to your computer and use it in GitHub Desktop.
Save saiyam1814/4eed7495b2df385b24037661d5bb89b9 to your computer and use it in GitHub Desktop.
Docker Ubuntu Installation
export http_proxy="http://proxyURL/"
export https_proxy="http://proxyURL/"
wget --no-check-certificate -q -O - 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-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
sudo mkdir -p /etc/systemd/system/docker.service.d
cd /etc/systemd/system/docker.service.d/
sudo touch http-proxy.conf
sudo vi http-proxy.conf
Add these lines :
[Service]
Environment="HTTP_PROXY=http://proxyURL/"
Environment="HTTPS_PROXY=http://proxyURL/"
Environment="NO_PROXY=localhost,127.0.0.0/8,docker-registry.somecorporation.com"
press: esc:wq! press enter
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo docker container ps
====================
install docker compose
- make sure the the proxy for http and https is exported
- wget https://github.com/docker/compose/releases/download/1.17.1/docker-compose-Linux-x86_64
- cp docker-compose-Linux-x86_64 docker-compose
- cp docker-compose /usr/local/bin/
- chmod +x /usr/local/bin/docker-compose
======================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment