What Are The Different Statuses of Individual Docker Containers?

Question
In Docker what are possible status values of containers?

Answer
Possible statuses include the following:

created, restarting, running, removing, paused, up, exited, or dead

Sources: 1) https://docs.docker.com/engine/reference/commandline/ps/ (for every one except “up”)
2) https://www.thegeekdiary.com/how-to-list-start-stop-delete-docker-containers/ (for “up”)

The docker create command when used with a Docker image ID will produce a new container in the “Created” state.

 » Read more..

How Do You Troubleshoot “no context directory specified, and no dockerfile specified”?

Problem scenario
You run a command like this: docker build -t “ricepaper:contint”

But you receive a message such as this:

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
no context directory specified, and no dockerfile specified

How do you resolve this problem?

Solution
Use a space and a period at the end of the command.

 » Read more..

How Do You Create a Kubernetes Cluster?

Problem scenario
You want to create a Kubernetes cluster. What should you do?

Solution
You should install Kubernetes. You will need a proper .yaml file in a directory on a server with kubectl installed and configured. You would then run a “kubectl create” command. See this posting for more information.

 » Read more..

How Do You Know if You Have Helm Installed and what Version You Are Using?

Problem scenario
You want to use Helm to manage Kubernetes applications. Helm helps you with packages for changes to Kubernetes (in ways that are similar to yum or apt). Helm uses what are call Charts (.yaml files) that enable you to do more with Kubernetes with less trouble. Helm consists of these two things: a CLI tool and a server component that runs as a pod in a Kubernetes cluster (page 531 of Kubernetes in Action by Luksa).

 » Read more..

How Do You Install Helm on a Debian or Ubuntu Linux Server without Internet Access?

Problem scenario
You want to use Helm to manage Kubernetes applications. Helm helps you with packages for changes to Kubernetes (in ways that are similar to yum or apt). Helm uses what are call Charts (.yaml files) that enable you to do more with Kubernetes with less trouble. Helm consists of these two things: a CLI tool and a server component that runs as a pod in a Kubernetes cluster (page 531 of Kubernetes in Action by Luksa).

 » Read more..

How Can You Change the cgroups Settings for Docker Containers while Bypassing Docker?

Problem scenario
You want to bypass Docker and configure the cgroups directly. You want new Docker containers to be governed by these customized settings. What should you do?

Solution
You may not want to bypass Docker for your cgroup modifications. You should read about the libcontainers. By default Docker uses libcontainers for granular configuration changes along the lines of modifying cgroups settings. You could potentially use LXC,

 » Read more..

How Do You Scale Out the Nodes of an AKS Cluster?

Problem scenario
You are using AKS (Azure Kubernetes Service). You have a cluster that you want to have more nodes. (Please do not confuse nodes with pods; see this posting if you are not sure about the difference.) What should you do?

Solution
You need to know the name of the cluster and the resource group it is in. Draft a command like this:

az aks scale –name foocluster –node-count 5 –resource-group barrg

-Replace “5” with the number of nodes you want to scale up.

 » Read more..

Why is Docker Popular with Jenkins?

Question
You have noticed that Docker and Jenkins are regularly used together. Why is this?

Answer
1. The docker build command produces one artifact. Jenkins lends itself to well-defined tasks.

2. The logic and dependencies of the build can usually be completely contained in the Dockerfile (page 20 of Docker Up and Running). Simple lines of text can standardize many aspects of a given build (e.g.,

 » Read more..

How Do You Install Spring Framework with Docker?

Problem scenario
You want to deploy the Spring framework with Docker. How do you do this?

Solution
Warning: The last step in this is not a security “recommended practice.” Only follow these directions (with sudo docker run…), if the server is not that important or you are in a very secure network. One published book says you can use “sudo docker …” as long as the server is not in production (page 43 of Docker Up and Running).

 » Read more..

What is a Secret in Kubernetes?

Question
What is a Secret in Kubernetes?

Answer
It is a ConfigMap with sensitive data that is encoded in Base64 text. What is a ConfigMap? It is a .yaml with a special format. There is always a “data:” section that is part of the YAML definition of a ConfigMap. The key-value pairs in the “data” section will have keys that appear in regular text;

 » Read more..