DEV Community

Zaki Arrozi Arsyad
Zaki Arrozi Arsyad

Posted on

1

docker : installation

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay