Docker, Every Basic Things I Need To Know

Having started the learning journey with Docker, I took some courses on Pluralsight, Nigel Poulton Docker Deep Dive Course. It is a wonderful course. It helps me understand the overall design, principles of the Docker. It also empowers me with many hands-on commands that can use immediately. I did, I practiced them while watching the course.

Suddenly, I asked myself. Hey, wait a minute! You will soon forget them all. Well, because you will not use them in the near future, or at least you will not know when you will them. I convinced myself that there is a document in the Docker office website. We are all, as a human being, having many good reasons to convince ourselves not doing something. I realize that I was set up a trap for myself.

With the exposing of the information age, the problem is not lacking information. Rather it is a problem of how to get started. Take an example of the Docker, head over to the document site, then what will you do first? Many people will know where to start. But at the same time, there is a vast majority of not.

Welcome to the fundamental of Docker!

By writing them out here, I, later, can know what to look for in detail. Instead of checking all the document, I simply look for the detail of specific commands, which is a very limited amount.

Docker Commands

A list of basic commands that I should need to know to work with

docker version

See client and server (daemon) version information

docker info

docker run

Run a docker image

docker pull

Pull a docker image from docker hub to local environment

docker push

Push a local docker image to the docker hub

docker build

Build a docker image from a Dockerfile file.

docker images

Display all images

docker history {image name/id}

See history of an image

docker ps

List containers

docker inspect

Inspect container. Very useful to dig deeper into a container

docker port {container name}

Display the port mapping between container and host

docker rmi {image id}

Remove an image

docker start {container id}

Start a container

docker stop {container id}

Stop a container

docker rm {container id}

Remove a container

docker attach {container id}

Attach (or interact) with a container

docker logs -f

Attach to a running container, which means we can interact with the container shell, if it is a Linux

Docker Networking

[List of things I learn through the course.]

docker0 bridge (Ethernet switch)

On host machine (Linux), install: apt-get install bridge-utils

command brctl show docker0.

icc (Inter Container Communication) and iptables: both are true by default

Next?

Learn what, how to take advantages of Docker in the modern software development.

What you do with what you know is more important than what you know

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: