What Is a Dockerfile and What Is a Docker Image?

Question / Problem scenario
You know what a Docker container is.  What is a Dockerfile and what is a Docker image?

Answer to What is a Dockerfile?
“Dockerfiles are used to define how a container should look at build time, but they do not manage the container’s ongoing state, and cannot be used to manage the Docker host system.” (Page 5 of Docker Up &

How Do You Troubleshoot the Docker Command Error “not a valid repository/tag”?

Problem scenario
You are trying to run a Docker command, but you get this error:

Error parsing reference: ” continual/integration” is not a valid repository/tag.

What do you do?

Solution
Look to see if you have an extra “\” or space in your Docker run command.  That can cause this problem.

What Are The Differences between CMD and ENTRYPOINT in Docker?

Question
Dockerfile has reserved words CMD and ENTRYPOINT.  They seem to do the same thing.  What are the differences between CMD and ENTRYPOINT in Docker besides their words’ lengths?

Answer
There are many similarities between these two reserved words in Dockerfile “language.”  But here are three differences:

#1  “…CMD can be overwritten by an argument to docker run, while ENTRYPOINT can be overwritten only by using the –entrypoint option of docker run.” is a quote taken from page 43 of 

How Do You Install docker-compose on Any Distribution of Linux?

Problem scenario
You want a Bash script to install Docker on any distribution of Linux.  You want to use the same script for each Linux server.  How do you write a script that will install docker-compose on any type of Linux including CentOS/RHEL/Fedora, Debian/Ubuntu and Linux SUSE?

Solution
Overview

This will work with AWS or Azure servers or on-premise servers.  It requires that the server have access to the internet.

How Do You Use a Dockerfile with Reserved Words ENTRYPOINT and CMD to Create an Image and Test It Out?

Problem scenario
You want to use the ENTRYPOINT and CMD keywords in a Dockerfile.  You know that the value of CMD amounts to a parameter for the ENTRYPOINT value which is executed.  You want to verify that the value of ENDPOINT is used in an execution.  You want the Dockerfile to be simple to illustrate these reserved words.  What do you do?

Solution
Prerequisite
Install Docker. 

What Is The Difference between a Kubernetes Service, the Kubelet, and the Kubernetes API?

Question
You know of different Kubernetes components: the Kubernetes Service, the Kubelet, and the Kubernetes API.  What do these components do and how are they different?

Answer
A Kubernetes service is an entity, that may span nodes, that keeps a group of Pods functional and coherent (paraphrased from this site).  A “[s]ervice will get its own IP address and port” as quoted from page 339 of Kubernetes in Action

What Is The Difference between kubeadm and kubectl?

Problem scenario
Both kubeadm and kubectl are tools and commands for Kubernetes.  What are the differences between them?

Answer
kubeadm is for creating new Kubernetes clusters (as paraphrased from this Kubernetes.io page).  The command can be used to create both master nodes as well as worker nodes (taken from pg 575 Kubernetes in Action).

kubectl is for running operations on one or more existing Kubernetes clusters (as paraphrased from this 

How Do You Fix the Problem When You Get “docker command not found”?

Problem scenario
Docker is installed as far as you can tell on your Linux server.  You ran “sudo apt-get -y install docker” and it seemed to work.  When you run it again you see this:

“Building dependency tree
Reading state information… Done
docker is already the newest version (1.5-1+b1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

How do you get Docker to work when it seems installed but you get the error “docker command not found”?