How-to Quick-Start with Docker & Docker Containers on Ubuntu Linux

April 18th, 2017 by thelinuxevangelist

Docker Quick-Start on Ubuntu Linux




Hello Ubuntu User! This Tutorial Shows You Step-by-Step How-to Getting-Started with Docker, Docker Engine and Docker Containers on Ubuntu GNU/Linux Desktop/Server.

Docker is a Client and Server App that makes it easy to utilize Linux Containers by providing a Standard Format for Building and Sharing those Containers.

The Docker Client is a Shell Tool that allows you to Interact with the Docker daemon by the Docker API.

A Container (UNIX technology) is a Modified Runtime Environment for a program that prevents that program from accessing protected resources except where explicitly allowed.

Linux Containers provide also the necessary Isolation between Apps to Eliminate Conflicts between runtime Dependencies and Configurations.

In this Guide I’ll display straightforwardly How-to Create, Start, Stop, Kill, and Remove Docker Containers on Ubuntu.

How-to Quick-Start with Docker & Docker Container on Ubuntu - Featured
  1. Open a Shell session
    Ctr+Alt+t to open a Terminal emulator on Desktop
    (Press “Enter” to Execute Commands)

    How-to Quick-Start with Docker & Docker Container on Ubuntu - Open Terminal Shell Emulator
  2. How-to Install Docker on Ubuntu Easy Guide

    Docker Installation Guide
  3. Login as SuperUser
    The default Docker Administration Requires this Privileges…

    sudo su

    Then to Achieve this Session:

    exit
  4. Exploring Docker Commands

    docker help

    To Display Help for a single Command:

    docker help [dockerCommand]

    Example for the create command:

    docker help create
  5. How-to Create Docker Containers
    We’ll Pull the Docker Images from the Docker Repositories.
    (Although it’s possible to Install a Local Docker Image…)

    docker create --name redis redis

    This Create a Redis DB Image Named ‘redis’
    The -p Flag is related to the Connecting Port
    The -d Flag Detach the Instance and Run it on Background.

  6. To List the Docker Instance
    To List All:

    docker ps -a

    And only the Running ones:

    docker ps
  7. To Run Docker Containers
    By ID:

    docker start [ID]

    By Names:

    docker start [NAME]

    Example:

    docker start redis

    The Create & Run All-in-one Command Instead is:

    docker run -d --name redis1 -p 1234 redis
  8. To Stop & Kill Docker Containers
    By ID:

    docker stop [ID]/[NAME]

    By Names:

    docker kill [ID]/[NAME]

    Example:

    docker stop redis
  9. Remove/Delete a Docker Containers

    docker rm [ID]/[NAME]

    For Instance:

    docker rm redis
  10. How-to Run and Start to Use Docker Linux Images

    Docker Linux Images Quick-Start

Tags: , , , , , , , , , , , , , ,