Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Docker Basics

Docker:

Docker is not a Virtual Machine, its a client program named as Docker, its a command which you type it in command prompt, and also server program that manages a linux system. program that builds container from code. Its Service that distributes containers.

Use of Docker:

Docker used to manage a linux servers.

Basic Architecture of Docker Installation:

In Computer -> install Docker Toolbox Program named Docker. Docker toolbox installs Virtual box for managing virtual machine. If aleady virtual box installed, Docker toolbox will use it directly.

Docker virtual box installed program called as Linux Virtual Machine. and docker machine manages that linux virtual machine.

Inside that Linux virtual machine, Server side of the docker program.

Container:

A self-contained sealed unit of software. Contains everything required to run the code. includes code, configurations, process, networks, depencides & OS.

How to use Docker:

Click on “Docker Quickstart Terminal”.

Basic commands:

  • docker run hello-world – to verify the docker programming is running or not.
  • docker-machine start – which starts your machine.
  • docker-machine stop – which stops your machine.
  • docker-machine ip – prints the IP of virtual machine.
  • docker-machine ssh – which connects to virtual machine to this command prompt
  • docker-machine scp – copy files into / out of virtual machine.
  • docker-machine upgrade – Upgrades latest docker program into your virtual machine.
  • try to use docker-machine restart / upgrade if you are facing any issue to back to work.
  • docker info – to see the docker configuration information.
  • docker run -ti ubuntu bash – which makes command prompt more colorful.
  • Can exit ubuntu environment using “exit” or ctrl + D
  • docker run –net=host -ti ubuntu:14.04 bash to install actual demo environment,

Docker Installation:

Download Docker toolbox from https://www.docker.com/products/docker-toolbox

While first time if you are running, will download setup of batches.

Known Issues:

Click on “Docker Quickstart Terminal”, encountered Windows is searching for base.exe.

Solution:

icon -> right click and change the properties. from

"C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh"

to

"C:\Users\username\AppData\Local\Programs\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh"

The post Docker Basics appeared first on Drtuts.



This post first appeared on Drtuts, please read the originial post: here

Share the post

Docker Basics

×

Subscribe to Drtuts

Get updates delivered right to your inbox!

Thank you for your subscription

×