loading...

docker : installation

zakiarsyad profile image Zaki Arrozi Arsyad ・1 min read

Run commands to install docker in an ubuntu machine

Docker Engine

// download the script
$ curl -fsSL get.docker.com -o get-docker.sh

// create permission
$ chmod +x get-docker.sh

//run the script 
$ sh get-docker.sh

// check if it is successfully installed
$ docker --version

Docker Compose

Docker Compose helps us to running multi-container Docker applications with a YAML file configuration.

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

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

// check if it is successfully installed
$ docker-compose --version

Docker Machine

Docker Machine lets us install Docker Engine on virtual hosts, and manage the hosts with docker-machine commands.

// install docker-machine
$ base=https://github.com/docker/machine/releases/download/v0.16.0 &&
  curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine &&
  sudo mv /tmp/docker-machine /usr/local/bin/docker-machine &&
  chmod +x /usr/local/bin/docker-machine

// check if it is successfully installed
$ docker-machine --version

note : adding our user to the “docker” group, so that we can use docker as a non-root user

$ sudo usermod -aG docker your-user

Posted on by:

Discussion

pic
Editor guide