


Before we get started, there are a few prerequisites. (NOTE: Although pausing or stopping a container without a data volume mounted does not destroy the writable top layer, it is much easier and less tedious to manage the state using data volumes) Target Audienceĭocker newbies, Minecraft enthusiasts, and anyone interested in seeing how Blueprints can quickly deploy applications. Data volumes exists outside of Docker's storage area, so even if a container is deleted, data stored in a data volume still remains. Although it is possible to connect to a running container and interact with the file system belonging to that specific container, a better way is to use a data volume. All writes to the container that add new data or modify existing data are stored in this writable layer, which is persisted between container stops and restarts. When a container is started, a writable top layer is added to the image. By definition, images are static and composed of multiple layers. To enable applications to write to the file system, Docker uses a unification file system storage approach. Like WordPress, Minecraft can use Docker to achieve the stateful persistence required for game play.ĭocker's ability to deploy a pre-configured image into a running container within milliseconds is a huge advantage over VMs. As they interact with the environment and the objects within, changes to the world state are immediately saved to the file system. In Minecraft, players literally create or destroy almost anything in the game world that they inhabit.
DOCKER COMPOSE KITEMATIC HOW TO
This tutorial will explain how to quickly deploy a stateful, persistent Minecraft server using an image from the Docker Hub and a Docker Blueprint on the CenturyLink Cloud.Īfter seeing plenty of WordPress demos displaying stateful persistence between Docker container restarts, I thought it would be interesting to discuss another extremely popular application that uses stateful persistence - Minecraft.
