gitmyhub

docker.dockercraft

Lua ★ 7.4k updated 5y ago ▣ archived

Docker + Minecraft = Dockercraft

A novelty project that visualizes your running Docker containers as objects inside a Minecraft world, letting you start, stop, or remove them by flipping levers and buttons in the game.

GoLuaDockerCuberitesetup: moderatecomplexity 3/5

Dockercraft is a novelty project that lets you see and manage your running Docker containers inside a Minecraft world. Docker is a tool used by developers to package and run software in isolated environments called containers. Dockercraft takes those containers and represents each one as an object in a Minecraft world, where you can start, stop, or remove them by interacting with levers and buttons inside the game. You can also type certain Docker commands directly into Minecraft's chat window and have them execute against your real running containers.

The Minecraft client itself is not modified at all. You install the regular official Minecraft game and connect to a special server that Dockercraft sets up. That server runs inside a Docker container of its own and communicates with Docker on the host machine by reading Docker's internal communication socket. A small program written in Go listens for events from Docker and relays them to the Minecraft server, which runs as a custom server called Cuberite. Cuberite accepts plugins written in Lua, and the Docker integration is implemented as one of those plugins.

Setting it up involves pulling the Dockercraft Docker image, running it with the Docker socket mounted inside it, and then adding the resulting server address to Minecraft's multiplayer server list. The README includes a clear warning that this is only safe to run on a local machine because there is no authentication. Anyone who joins the server is treated as having full administrative access.

The world appearance is configurable. You can pass arguments when starting the container to choose different terrain types such as ocean, desert, forest, or jungle, which changes what the world around your containers looks like.

This project originated at Docker and is now in their public archive, meaning it is no longer actively maintained. It was built as a demonstration and fun experiment rather than a production tool.

Where it fits