Sign In
Sign In

What Is a Docker Container and How Is It Hosted?

What Is a Docker Container and How Is It Hosted?
Hostman Team
Technical writer
Infrastructure

Want to know what a Docker is? Need to know how to copy files from your host to a Docker container? Read this article to learn everything about Docker containers and Docker container hosting.

There are few technologies as popular as Docker. A lot of developers and administrators buzz about it. Docker is everywhere and we all must say that even if you’re not a DevOps engineer it is important to understand what Docker containers are, how these things work, and why they are so useful. Well, let’s figure it out.

What is a Docker container?

It is hard to answer the question "what is a Docker container" without explaining what containerization is. Containerization is an alternative way to create virtual machines. Instead of using hardware virtualization developers create software copies of computers where their applications are launched and run.

7add710c590e49e5f9b3609bdfe3be93

Docker is an open-source piece of software that is used to develop, test, deploy and run web applications in a special virtual environment. Docker helps to reduce the number of hardware resources needed to maintain running applications in a stable and efficient manner. Also, it is one of the best tools for developers who want to launch pre-made software products quickly, upscale them or move them to other environments without worrying about the reliability of their project or any other issues.

Container is a product of containerization. It is in essence quite similar to a virtual machine but a lot smaller and dedicated to maintaining only one application rather than a fully-fledged OS with a large number of software tools.

This kind of virtualization works like this:

  • We put all the necessary components of the web application into isolated software environments (virtual blocks).

  • Every block contains everything we need to launch an app properly.

  • Every block can be initiated multiple times.

So, containers are small virtual machines that help developers relaunch an application many times on one computer, and maintain this squadron of apps ensuring reliability and high performance.

How does Docker work?

The main part of aDocker is the Docker Engine. It consists of a server, REST API, and a client. The first is responsible for initializing and controlling containers, the second works as an interpreter between a user and a Docker, and the third is used to pass CLI commands to the Docker Engineserver.

5d57e21c7f033f4bec6dbce3b6bb2609

This is the way it works:

  • The user sends a CLI command to the Docker server via the Docker client. For example, a command that creates a new container or pulls the image of an OS with pre-installed software tools that the user wants to use in his project.

  • Then the Docker server analyses the command and configuration data written in Dockerfile (a kind of document that consists of Docker settings) and performs the actionsthe user’s command dictates..

  • After the command is executed the Docker container is activated.

So the main idea is that the developer communicates with an app in a virtual environment using special software layers created by Docker.

Docker advantages

There are 6 main advantages of using Docker instead of standard virtual machines:

  1. Docker saves computer resources. Instead of emulating OS it uses core components of Linux distributive installed on a server and creates containers for applications like database, interface, etc.

  2. Docker saves your time. You don’t have to set up every virtual machine. Set up just one and Docker will use core elements of it to create containers with the application running inside.

  3. It protects you from malware. Docker containers are isolated from the core OS. So you can run any code inside the virtual block without worrying about malware corrupting your server.

  4. It’s a piece of cake to scale. The only thing you have todo to scale your project — add new containers. The scope of the project depends on the number of virtual blocks used and nothing else.

  5. Docker can launch apps on any compatible host. So you don’t have to spend time setting everything up before starting containerized software.

  6. Docker works smoother than most virtualization technologies. It uses "integrated layer system" technology as an efficient file system.

Why are Docker containers popular?

You’re probably wondering, why should you be using Docker containers in the first place? Well, the idea behind Docker is really simple. That’s why this technology have become so popular among developers,container and Docker Engine server administrators, testers, programmers, and many others well.

6b48e5ff5b47f34105dd9311fcc9466d

It is often utilized in projects connected with large web services because of its easily scalable system where DevOps specialists can create new iterations of the app in only a few commands.

Also, administrators love Docker because of its monitoring system:it is easy to keep an eye on the whole system and individual components with containers.

How are Docker containers hosted?

Why should you host Docker containers?

The Docker ecosystem with containers and static files is an app, like classic websites or web applications. To make it accessible to users online you have to host it somewhere. On a remote PC that will maintain your service or application day and night .

Docker container hosts are not so different from any other hosts that DevOps specialists or developers work with. But it is really important to choose within the hosts the one that will give you the reliable, fully-fledged platform for your project.

What is a Docker host and how do we work with them? Generally, a Docker host is hardware that serves as a platform for the operating system and Docker containers;basically we are talking about the server. A computer that is placed somewhere in the host’s data center and works 24/7 to maintain your web application or website.

To work with containers (e.g. develop, test, deploy and run applications) you need a proper server. It can be a virtual private server or a dedicated server. Most of developers believe that dedicated is the best option. Some think that VPS is safer to use but the easiest way to host Docker containers is to use hosting platforms like Hostman. There’s an option in this platform that makes it possible to use GitHub (GitLab and Bitbucker are also supported) repository with your code and, in a few clicks, deploy it. All you have to do is:

  • connect your repository with the Dockerfile to a Hostman profile,

  • choose the option to deploy thea Docker container,

  • configure the host (server),

  • and wait till the rest is done almost automatically.

Ace1334a632adb407ffde5a201c565f6

Hostman will find all the necessary files and create an instance of your Docker service. In 3 simple steps, you’ll get ready for the work environment.

Hostman not only simplifies the process of deploying websites, applications, and complex IT infrastructures but grants users a secure and trustworthy server for projects of any type. Moreover, services like Hostman dramatically reduce costs of DevOps specialists because hosting will:

  • Set up a cloud server for you.

  • Install all dependencies.

  • Build the code.

  • Set up CDN for static files.

  • Install SSL certificate.

  • Monitor the app to relaunch it if it fails.

Essentially, Hostman becomes your DevOps engineer.

How are Docker containers connected to the host?

At the very beginning when we create a Docker image and are ready to launch the container for the first time, we use the command docker run. But it won’t work as expected because a developer has to forward ports so containers gain access to the host and vice versa.

It is necessary to connect Docker containers to the host because sometimes a lot of project files are saved on a local machine but are designed to be managed and accessible within containers.

So, to access the host from the Docker container, the developer has to use additional options while launching virtual machines. For example:

docker run -d -p 8099:8080 [name of the Docker container]

That will make it possible for the newly created virtual machine to interact with the local machine.

How to access the Docker container from your host?

It is quite easy.

  • First, open the directory where your Docker project is saved.

  • Then launch command docker container ls, so you can see all the containers that exist on your server.

  • And then launch command docker exec -it [name of the Docker container] /bin/bash.

That’s it. After accessing the docker container from the host as described you can manipulate your container as you wish.

How does file management work in Docker containers?

95ca8f44ca58568bf7751bf8afcc6572

Sometimes you need to move files between virtual machines and your local machine. For instance, to access logs. Or to bring some data to the local database. Let’s get into how to copy a file from host to Docker container and vice versa.

File management within Docker containers and Docker host is quite similar to what developers used to see in the Linux terminal. The commanders are almost the same for moving and copying files.

Let’s start with copying. It’ll give you an idea about everything else. For example, you have a task to copy a file from the Docker container to the host. You can do it using the command docker cp:

docker cp [options] [path to file in container] [path to host]
docker cp filename:/usr/local/apache2/conf/httpd.conf /home/fedora/dockers/httpd/

The command above copies the configuration file of Apache server from the Docker container to a local machine.

It works either way. If you need to copy a file from host to Docker container use the same command:

docker cp [options] [path to local file] [path to a container]

It’s dead simple. And it works, not only for files, but for directories.

How do you copy files from the Docker container to the host?

Usually, to move files from a docker container to a host (or the other way around) developers do the following:

  • Get access to the Docker container.

  • Copy files to host.

  • Remove files from the Docker container.

There are ways to use commands like RUN mv but they frequently fail to launch.

What is a Docker host IP?

By this term users and developers usually mean one of two different things.

The first one is the IP address that is used by people who use containerized applications. Of course, users access the Docker app using a domain name. But IP also exists and works the same way as it works with different websites and classic web applications. This is what’s also called Bridge address:the bridge between users and your application.

The second is the IP address of the Docker container itself which is used by different containers on one host to communicate with each other, stay connected, and work seamlessly managing common data (databases, logs, etc.). Put simply, as a result of interaction between these containers with different IPs, the Bridge IP is generated and makes it possible for users to access the app.

It is necessary to know the IP of certain Docker containers to make the interaction between them manageable.

How to get IP from a Docker container?

55efeae6e719a33ce231f84ae13be90c

There are three ways to get a Docker container’s IP address:

  1. The easiest way is to use the command docker inspect. Using the command line you must write something like docker inspect [name of your docker container]. If you don’t know the name of the container you need to inspect, you might want to use the command docker ps which will show you all the containers launched at the moment. Also, instead of a specific container, you can access the data from the whole network so you’ll see IPs for every container.

  2. Another method is docker exec. Using the command line you must write docker exec [name of the container] cat /etc/hosts. After that, you’ll see the result with local address and IP address at the last line of code.

  3. The third and final method — using docker exec but inside the Docker container. It is the same command we use for accessing containers but with a small addition. Using the command line you must write docker exec -it [name of the container]. After that, you can access the container’s data. To get the IP address just write ip -4 -o address and CL will return the IP of the container you’re in. Also, it is possible to get data from other containers. Just write ping [name of another docker] container. It’ll show the IP address of a pinged resource.

Summary

So, here we are. That’s the basics of Docker. Simple commands to launch it, move files around, etc. But the coolest thing is that these commands are all that you need because services like Hostman will automate the process of deploying and basic setup.

You just need to choose a configuration of a web server on the Hostman’s website and connect it with your GitHub, GitLab, or Bitbucket account. It will cost you $5.5/month and you can try all the functions for free during the 7-days trial period.

Infrastructure

Similar

Infrastructure

Virtualization vs Containerization: What They Are and When to Use Each

This article explores two popular technologies for abstracting physical hardware: virtualization and containerization. We will provide a general overview of each and also discuss the differences between virtualization and containerization. What Is Virtualization The core component of this technology is the virtual machine (VM). A VM is an isolated software environment that emulates the hardware of a specific platform. In other words, a VM is an abstraction that allows a single physical server to be transformed into multiple virtual ones. Creating a VM makes sense when you need to manage all operating system kernel settings. This avoids kernel conflicts with hardware, supports more features than a specific OS build might provide, and allows you to optimize and install systems with a modified kernel. What Is Containerization Containers work differently: to install and run a container platform, a pre-installed operating system kernel is required (this can also be on a virtual OS). The OS allocates system resources for the containers that provide a fully configured environment for deploying applications. Like virtual machines, containers can be easily moved between servers and provide a certain level of isolation. However, to deploy them successfully, it’s sufficient for the base kernel (e.g., Linux, Windows, or macOS) to match — the specific OS version doesn’t matter. Thus, containers serve as a bridge between the system kernel layer and the application layer. What Is the Difference Between Containerization and Virtualization Some, especially IT beginners, often frame it as "virtualization vs containerization." But these technologies shouldn't be pitted against each other — they actually complement one another. Let’s examine how they differ and where they overlap by looking at how both technologies perform specific functions. Isolation and Security Virtualization makes it possible to fully isolate a VM from the rest of the server, including other VMs. Therefore, VMs are useful when you need to separate your applications from others located on the same servers or within the same cluster. VMs also increase the level of network security. Containerization provides a certain level of isolation, too, but containers are not as robust when it comes to boundary security compared to VMs. However, solutions exist that allow individual containers to be isolated within VMs — one such solution is Hyper-V. Working with the Operating System A VM is essentially a full-fledged OS with its own kernel, which is convenient but imposes high demands on hardware resources (RAM, storage, CPU). Containerization uses only a small fraction of system resources, especially with adapted containers. When forming images in a hypervisor, the minimal necessary software environment is created to ensure the container runs on an OS with a particular kernel. Thus, containerization is much more resource-efficient. OS Updates With virtualization, you have to download and install OS updates on each VM. To install a new OS version, you need to update the VM — in some cases, even create a new one. This consumes a significant amount of time, especially when many virtual machines are deployed. With containers, the situation is similar. First, you modify a file (called a Dockerfile) that contains information about the image. You change the lines that specify the OS version. Then the image is rebuilt and pushed to a registry. But that’s not all: the image must then be redeployed. To do this, you use orchestrators — platforms for managing and scaling containers. Orchestration tools (the most well-known are Kubernetes and Docker Swarm) allow automation of these procedures, but developers must install and learn them first. Deployment Mechanisms To deploy a single VM, Windows (or Linux) tools will suffice, as will the previously mentioned Hyper-V. But if you have two or more VMs, it’s more convenient to use solutions like PowerShell. Single containers are deployed from images via a hypervisor (such as Docker), but for mass deployment, orchestration platforms are essential. So in terms of deployment mechanisms, virtualization and containerization are similar: different tools are used depending on how many entities are being deployed. Data Storage Features With virtualization, VHDs are used when organizing local storage for a single VM. If there are multiple VMs or servers, the SMB protocol is used for shared file access. Hypervisors for containers have their own storage tools. For example, Docker has a local Registry repository that lets you create private storage and track image versions. There is also the public Docker Hub repository, which is used for integration with GitHub. Orchestration platforms offer similar tools: for instance, Kubernetes can set up file storage using Azure’s infrastructure. Load Balancing To balance the load between VMs, they are moved between servers or even clusters, selecting the one with the best fault tolerance. Containers are balanced differently. They can’t be moved per se, but orchestrators provide automatic starting or stopping of individual containers or whole groups. This enables flexible load distribution between cluster nodes. Fault Tolerance Faults are also handled in similar ways. If an individual VM fails, it’s not difficult to transfer that VM to another server and restart the OS there. If there’s an issue with the server hosting the containerization platform, containers can be quickly recreated on another server using the orchestrator. Pros and Cons of Virtualization Advantages: Reliable isolation. Logical VM isolation means failures in one VM don’t affect the others on the same server. VMs also offer a good level of network security: if one VM is compromised, its isolation prevents infection of others. Resource optimization. Several VMs can be deployed on one server, saving on purchasing additional hardware. This also facilitates the creation of clusters in data centers. Flexibility and load balancing. VMs are easily transferred, making it simpler to boost cluster performance and maintain systems. VMs can also be copied and restored from backups. Furthermore, different VMs can run different OSs, and the kernel can be any type — Linux, Windows, or macOS — all on the same server. Disadvantages: Resource consumption. VMs can be several gigabytes in size and consume significant CPU power. There are also limits on how many VMs can run on a single server. Sluggishness. Deployment time depends on how "heavy" the VM is. More importantly, VMs are not well-suited to scaling. Using VMs for short-term computing tasks is usually not worthwhile. Licensing issues. Although licensing is less relevant for Russian developers, you still need to consider OS and software licensing costs when deploying VMs — and these can add up significantly in a large infrastructure. Pros and Cons of Containerization Advantages: Minimal resource use. Since all containers share the same OS kernel, much less hardware is needed than with virtual machines. This means you can create far more containers on the same system. Performance. Small image sizes mean containers are deployed and destroyed much faster than virtual machines. This makes containers ideal for developers handling short-term tasks and dynamic scaling. Immutable images. Unlike virtual machines, container images are immutable. This allows the launch of any number of identical containers, simplifying testing. Updating containers is also easy — a new image with updated contents is created on the container platform. Disadvantages: Compatibility issues. Containers created in one hypervisor (like Docker) may not work elsewhere. Problems also arise with orchestrators: for example, Docker Swarm may not work properly with OpenShift, unlike Kubernetes. Developers need to carefully choose their tools. Limited lifecycle. While persistent container storage is possible, special tools (like Docker Data Volumes) are required. Otherwise, once a container is deleted, all its data disappears. You must plan ahead for data backup. Application size. Containers are designed for microservices and app components. Heavy containers, such as full-featured enterprise software, can cause deployment and performance issues. Conclusion Having explored the features of virtualization and containerization, we can draw a logical conclusion: each technology is suited to different tasks. Containers are fast and efficient, use minimal hardware resources, and are ideal for developers working with microservices architecture and application components. Virtual machines are full-fledged OS environments, suitable for secure corporate software deployment. Therefore, these technologies do not compete — they complement each other.
10 June 2025 · 7 min to read
Infrastructure

Top RDP Clients for Linux in 2025: Remote Access Tools for Every Use Case

RDP (Remote Desktop Protocol) is a proprietary protocol for accessing a remote desktop. All modern Windows operating systems have it by default. However, a Linux system with a graphical interface and the xrdp package installed can also act as a server. This article focuses on Linux RDP clients and the basic principles of how the protocol works. Remote Desktop Protocol RDP operates at the application layer of the OSI model and is based on the Transport Layer Protocol (TCP). Its operation follows this process: A connection is established using TCP at the transport layer. An RDP session is initialized. The RDP client authenticates, and data transmission parameters are negotiated. A remote session is launched: the RDP client takes control of the server. The server is the computer being remotely accessed. The RDP client is the application on the computer used to initiate the connection. During the session, all computational tasks are handled by the server. The RDP client receives the graphical interface of the server's OS, which is controlled using input devices. The graphical interface may be transmitted as a full graphical copy or as graphical primitives (rectangles, circles, text, etc.) to save bandwidth. By default, RDP uses port 3389, but this can be changed if necessary. A typical use case is managing a Windows remote desktop from a Linux system. From anywhere in the world, you can connect to it via the internet and work without worrying about the performance of the RDP client. Originally, RDP was introduced in Windows NT 4.0. It comes preinstalled in all modern versions of Windows. However, implementing a Linux remote desktop solution requires special software. RDP Security Two methods are used to ensure the security of an RDP session: internal and external. Standard RDP Security: This is an internal security subsystem. The server generates RSA keys and a public key certificate. When connecting, the RDP client receives these. If confirmed, authentication takes place. Enhanced RDP Security: This uses external tools to secure the session, such as TLS encryption. Advantages of RDP RDP is network-friendly: it can work over NAT, TCP, or UDP, supports port forwarding, and is resilient to connection drops. Requires only 300–500 Kbps bandwidth. A powerful server can run demanding apps even on weak RDP clients. Supports Linux RDP connections to Windows. Disadvantages of RDP Applications sensitive to latency, like games or video streaming, may not perform well. Requires a stable server. File and document transfer between the client and server may be complicated due to internet speed limitations. Configuring an RDP Server on Windows The most common RDP use case is connecting to a Windows server from another system, such as a Linux client. To enable remote access, the target system must be configured correctly. The setup is fairly simple and works "out of the box" on most modern Windows editions.  Enable remote desktop access via the Remote Access tab in System Properties. Select the users who can connect (by default, only administrators). Check firewall settings. Some profiles like “Public” or “Private” may block RDP by default. If the server is not in a domain, RDP might not work until you allow it manually via Windows Firewall → Allowed Apps. If behind a router, you might need to configure port forwarding via the router’s web interface (typically under Port Forwarding). Recall that RDP uses TCP port 3389 by default. Best RDP Clients for Linux Remmina Website: remmina.org Remmina is a remote desktop client with a graphical interface, written in GTK+ and licensed under GPL. In addition to RDP, it supports VNC, NX, XDMCP, SPICE, X2Go, and SSH. One of its key features is extensibility via plugins. By default, RDP is not available until you install the freerdp plugin. After installing the plugin, restart Remmina, and RDP will appear in the menu. To connect: Add a new connection. Fill in connection settings (you only need the remote machine's username and IP). Customize further if needed (bandwidth, background, hotkeys, themes, etc.). Save the connection — now you can connect with two clicks from the main menu. If you need to run Remmina on Windows, a guide is available on the official website. FreeRDP Website: freerdp.com FreeRDP is a fork of the now-unsupported rdesktop project and is actively maintained under the Apache license. FreeRDP is a terminal-based client. It is configured and launched entirely via the command line. Its command structure is similar to rdesktop, for example: xfreerdp -u USERNAME -p PASSWORD -g WIDTHxHEIGHT IP This command connects to the server at the given IP using the specified credentials and screen resolution. KRDC Website: krdc KRDC (KDE Remote Desktop Client) is the official remote desktop client for KDE that supports RDP and VNC protocols. It offers a clean and straightforward interface consistent with KDE's Plasma desktop environment. KRDC is ideal for users of KDE-based distributions like Kubuntu, openSUSE KDE, and Fedora KDE Spin. It integrates well with KDE's network tools and provides essential features such as full-screen mode, session bookmarking, and network browsing via Zeroconf/Bonjour. KRDC is actively maintained by the KDE community and is available through most Linux package managers. GNOME Connections Website: gnome-connections Vinagre was the former GNOME desktop's default remote desktop client. GNOME Connections, a modernized remote desktop tool for GNOME environments, has since replaced it. GNOME Connections supports RDP and VNC, providing a simple and user-friendly interface that matches the GNOME design language. It focuses on ease of use rather than configurability, making it ideal for non-technical users or quick access needs. Features: Bookmarking for quick reconnections Simple RDP session management Seamless integration into GNOME Shell Connections is maintained as part of the official GNOME project and is available in most distribution repositories. Apache Guacamole Website: guacamole.apache.org This is the simplest yet most complex remote desktop software for Linux. Simple because it works directly in a browser — no additional programs or services are needed. Complex because it requires one-time server installation and configuration. Apache Guacamole is a client gateway for remote connections that works over HTML5. It supports Telnet, SSH, VNC, and RDP — all accessible via a web interface. Although the documentation is extensive, many ready-made scripts exist online to simplify basic setup. To install: wget https://git.io/fxZq5 -O guac-install.sh chmod +x guac-install.sh ./guac-install.sh After installation, the script will provide a connection address and password. To connect to a Windows server via RDP: Open the Admin Panel, go to Settings → Connections, and create a new connection. Enter the username and IP address of the target machine — that's all you need. The connection will now appear on the main page, ready for use. Conclusion RDP is a convenient tool for connecting to a remote machine running Windows or a Linux system with a GUI. The server requires minimal setup — just a few settings and firewall adjustments — and the variety of client programs offers something for everyone.
09 June 2025 · 6 min to read
Infrastructure

Docker Container Storage and Registries: How to Store, Manage, and Secure Your Images

Docker containerization offers many benefits, one of which is image layering, enabling fast container generation. However, containers have limitations — for instance, persistent data needs careful planning, as all data within a container is lost when it's destroyed. In this article, we’ll look at how to solve this issue using Docker’s native solution called Docker Volumes, which allows the creation of persistent Docker container storage. What Happens to Data Written Inside a Container To begin, let’s open a shell inside a container using the following command: docker run -it --rm busybox Now let’s try writing some data to the container: echo "Hostman" > /tmp/data cat /tmp/data Hostman We can see that the data is written, but where exactly? If you're familiar with Docker, you might know that images are structured like onions — layers stacked on top of each other, with the final layer finalizing the image. Each layer can only be written once and becomes read-only afterward. When a container is created, Docker adds another layer for handling write operations. Since container lifespans are limited, all data disappears once the container is gone. This can be a serious problem if the container holds valuable information. To solve this, Docker provides a solution called Docker Volumes. Let’s look at what it is and how it works. Docker Volumes Docker Volumes provide developers with persistent storage for containers. This tool decouples data from the container’s lifecycle, allowing access to container data at any time. As a result, data written inside containers remains available even after the container is destroyed, and it can be reused by other containers. This is a useful solution for sharing data between Docker containers and also enables new containers to connect to the existing storage. How Docker Volumes Work A directory is created on the server and then mounted into one or more containers. This directory is independent because it is not included in the Docker image layer structure, which allows it to bypass the read-only restriction of the image layers for containers that include such a directory. To create a volume, use the following command: docker volume create Now, let’s check its location using: docker volume inspect volume_name The volume name usually consists of a long alphanumeric string. In response, Docker will display information such as the time the volume was created and other metadata, including the Mountpoint. This line shows the path to the volume. To view the data stored in the volume, simply open the specified directory. There are also other ways to create a Docker Volume. For example, the -v option can be added directly during container startup, allowing you to create a volume on the fly: docker run -it --rm -v newdata:/data busybox Let’s break down what’s happening here: The -v argument follows a specific syntax, indicated by the colon right after the volume name (in this case, we chose a very creative name, newdata). After the colon, the mount path inside the container is specified. Now, you can write data to this path, for example: echo "Cloud" > /data/cloud Data written this way can easily be found at the mount path. As seen in the example above, the volume name is not arbitrary — it matches the name we provided using -v. However, Docker Volumes also allow for randomly generated names, which are always unique to each host. If you’re assigning names manually, make sure they are also unique. Now, run the command: docker volume ls If the volume appears in the list, it means any number of other containers can use it. To test this, you can run: docker run -it --rm -v newdata:/data busybox Then write something to the volume. Next, start another container using the exact same command and you’ll see that the data is still there and accessible — meaning it can be reused. Docker Volumes in Practice Now let’s take a look at how Docker Volumes can be used in practice. Suppose we're developing an application to collect specific types of data — let’s say football statistics. We gather this data and plan to use it later for analysis — for example, to assess players’ transfer market values or for betting predictions. Let’s call our application FootballStats. Preserving Data After Container Removal Obviously, if we don’t use Docker Volumes, all the collected statistics will simply be lost as soon as the container that stored them is destroyed. Therefore, we need to store the data in volumes so it can be reused later. To do this, we use the familiar -v option:  -v footballstats:/dir/footballstats This will allow us to store match statistics in the /dir/footballstats directory, on top of all container layers. Sharing Data Suppose the FootballStats container has already gathered a certain amount of data, and now it's time to analyze it. For instance, we might want to find out how a particular team performed in the latest national championship or how a specific player did — goals, assists, cards, etc. To do this, we can mount our volume into a new container, which we’ll call FootballStats-Analytics. The key advantage of this setup is that the new container can read the data without interfering with the original FootballStats container’s ongoing data collection. At the same time, analysis of the incoming data can be performed using defined parameters and algorithms. This information can be stored anywhere, either in the existing volume or a new one, if needed. Other Types of Mounts In addition to standard volumes, Docker Volumes also supports other types of mounts designed to solve specialized tasks: Bind Mount Bind mounts are used to attach an existing path on the host to a container. This is useful for including configuration files, datasets, or static assets from websites. To specify directories for mounting into the container, use the --mount option with the syntax <host path>:<container path>. Tmpfs Mount Tmpfs mounts serve the opposite purpose of regular Docker Volumes — they do not persist data after the container is destroyed. This can be useful for developers who perform extensive logging. In such cases, continuously writing temporary data to disk can significantly degrade system performance. The --tmpfs option creates temporary in-memory directories, avoiding constant access to the file system. Drivers Docker Volume Drivers are a powerful tool that enable flexible volume management. They allow you to specify various storage options, the most important being the storage location — which can be local or remote, even outside the physical or virtual infrastructure of the provider. This ensures that data can survive not only the destruction of the container but even the shutdown of the host itself. Conclusion So, we’ve learned how to create and manage storage using Docker Volumes. For more information on how to modify container storage in Docker, refer to the platform’s official documentation. 
09 June 2025 · 6 min to read

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support