Ubuntu 17.04: Install docker-engine for container


Table of Contents

1 Install docker-engine

The following script will install docker-engine.

  • Add user to docker group for using docker command withou sudo.

#!/bin/shset -e# Install dependencies.sudo apt install -y curl apt-transport-https software-properties-common ca-certificates# Install docker.curl -fsSL | sudo apt-key add -sudo add-apt-repository “deb ubuntu-$(lsb_release -cs) main”sudo apt-get update -ysudo apt-get install -y docker-engine# Run docker.sudo systemctl start dockersudo systemctl enable docker# Add user to docker group for using docker without sudo command.sudo gpasswd -a “${USER}” docker# Rebootsudo reboot

2 Execution result

Run hello-world.

$ docker run hello-world<snip>Hello from Docker!<snip>

Android | Linux | SDL - Narrow Escape