Install docker compose on ubuntu 16.04 / centos 7

  1. Download docker compose
sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

The latest version of docker compose can be found at https://github.com/docker/compose/releases

2. Set execute permission to the docker-compose

sudo chmod +x /usr/local/bin/docker-compose

3.   Test installation

$ docker-compose --version
docker-compose version 1.18.0, build 8dd22a9

 

4. Create docker-compose.yml file and add entries

eg:-

nginx:
 image: nginx
 ports:
 - "80:80"

5. To run the whole system

docker-compose up -d

 

 

 

Docker installation on ubuntu

  • Update the packages in the server

$ sudo apt-get update

  • Add docker GPG key

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –

  • Setup stable docker repository

$ sudo add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”

  • Install docker-ce

$ sudo apt-get install docker-ce

  • Install a particular version of docker-ce

$ sudo apt-get install docker-ce=<VERSION>

  • Get system wide information about docker

$ sudo docker info

 

Docker Installation on Fedora 24

Docker Installation on Linux – Fedora 241.  Update the fedora packages,

        #  dnf update
2.  Create the docker.repo file and add the following entries;

[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/fedora//
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

3. Now install the docker-engine
4.  Now enable the docker service and start the docker.
5.  To test docker installation,