The “docker container” command is an essential part of the Docker ecosystem and is used to manage Docker containers. Docker containers are lightweight and isolated environments that encapsulate an application and its dependencies, allowing for consistent and reproducible execution across different systems. The “docker container” command provides a set of subcommands that enable users to […]
Docker
“docker compose” Command Examples
“Docker Compose” is a tool provided by Docker that simplifies the management and deployment of multi-container applications. It allows developers to define and run multi-container Docker applications using a declarative YAML file called a “docker-compose.yml.” The primary purpose of Docker Compose is to orchestrate the deployment and coordination of multiple containers that make up a […]
“docker commit” Command Examples
The “docker commit” command is a feature of Docker that allows users to create a new Docker image based on the changes made to a running container. It provides a convenient way to capture and save modifications made to a container’s file system or configuration as a new reusable image. The primary purpose of the […]
“docker build” Command Examples
The “docker build” command is a fundamental component of Docker, a popular containerization platform. It allows users to build a Docker image based on the instructions defined in a Dockerfile. The main purpose of the “docker build” command is to automate the process of creating Docker images. A Docker image is a lightweight, standalone, and […]
crictl: Command-line for CRI-compatible container runtimes
The “crictl” command-line tool is designed to interact with container runtimes that adhere to the Container Runtime Interface (CRI) specification. It provides a convenient way to manage and inspect containers, pods, images, and other resources in CRI-compatible container runtimes from the command line. Here are some key features and functionalities of the “crictl” command: Container […]
Unable to run NGINX Docker due to “13: Permission denied”
The Problem The NGINX docker container was started using the below command: # docker run –detach –name nginx_server nginx 4ffbcd5ee796b8cce3f2c6ed4cce8927d2b13a040af07b36f7a866b2157290e8 But user failed to get connection to the NGINX server. Upon troubleshooting user found below error logs: # tail -f /var/log/audit/audit.log type=AVC msg=audit(1565283160.116:316): avc: denied { write } for pid=2387 comm=”nginx” name=”nginx” dev=”dm-0″ ino=140648937 scontext=system_u:system_r:container_t:s0:c345,c550 […]
How to Configure Network Namespaces in Docker Containers
This post tells how Docker uses network namespace to isolate resources. The following figure is the lab setup to help you understand the steps visually: 1. Create two network namespaces: ns1 and ns2. – Add two new naetwork namespaces: # ip netns add ns1 # ip netns add ns2 The above commands create network space […]
“su: Authentication failure” – in Docker
The Problem In some situations, a normal user within a Docker container cannot run ‘su’ command to switch user. When ‘su’ command is issued, the following error returns. $ su – Password: [entering correct password] su: Authentication failure The Solution The sticky permission may be missing in /usr/bin/su within the container. With root privilege, you […]
How to Pause and Resume Docker Containers
Question: How to Pause and Resume running containers on docker host? This post will help to know about pausing and resuming any running containers on the Docker host. Let’s first start the docker container “memory_test” on the docker host. # docker start memory_test memory_test To stop the pause the docker container: # docker pause memory_test […]
How to find docker storage device and its size (device mapper storage driver)
Question: How to find the running docker storage device when docker is using the device-mapper storage driver and then check the size of it? 1. Please run the “docker info” command to display docker system-wide information which contains the docker storage info. # docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 […]