Distribute Cloud Environment on Ubuntu 14.04 with Docker

Install Docker on Ubuntu 14.04 LTS

Installing Docker on Ubuntu

  1. To verify wget installed or not
    $ which wget
    
    If wget isn't installed, update apt and install wget
    $ sudo apt-get update; $ sudo apt-get install wget
    
  2. Get the latest Docker package
    $ wget -qO- https://get.docker.com/ | sh
    
  3. Verify docker installed or not
    $ sudo docker-run hello-world
    
    This command download a test image and run it in a container.

Basic Docker Command-line

Show running containers:

$ sudo docker ps

Show all images in your local repository:

$ sudo docker images

Run a container from a specific image

$ sudo docker run -i -t <image_id || repository:tag> -bash

Start a existed container:

$ sudo docker start -i <image_id>

Attach a running container:

$ sudo docker attach <container_id>

Exit without shutting down a container:

[Ctrl-p] + [Ctrl-q]

Reference

https://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit