concept running container in category microservice

appears as: running container
Bootstrapping Microservices with Docker, Kubernetes and Terraform

This is an excerpt from Manning's book Bootstrapping Microservices with Docker, Kubernetes and Terraform.

This time when we invoke docker run we are using all the same arguments that we did back in section 3.8.3. There’s -d for detached mode and -p to bind the port. The only thing we have changed here is the tag that we use to identify the image. In this case, the tag also identifies the remote registry from which to pull the image.

Microservices Security in Action

This is an excerpt from Manning's book Microservices Security in Action.

The whole purpose of expecting servers to be immutable in a microservices deployment is to make deployment clean and simple. At any point, you can kill a running container and create a new one with the base configuration without worrying about runtime data. If the load on a microservice is getting high, for example, you need more server instances to scale horizontally. Because none of the running server instances maintains any runtime state, you can simply spin up a new container to share the load.

In case we skip the name argument, Docker then assigns a generated universally unique identifier (UUID) as the name of the container. In addition to the name, a container also carries an ID (container ID), a randomly generated identifier that can’t be changed. The main difference between the container ID and the container name is that we can change the name of a running container (using docker rename), but the container IDs are immutable. It’s always better to give a container a name that’s human readable or easy to remember. This helps you perform certain operations on a running container. Otherwise, if you want to do something on a container, first you need to find out the corresponding container ID or the system-generated container name.