This project provides a Docker container that simulates a Klipper 3D printer, allowing you to test and develop Klipper Components without needing a physical printer. It also includes Moonraker, a dummy webcam, and a pre-configured Klipper instance.
There are two ways to set up the Virtual-Klipper-Printer. You can use the pre-built Docker image from GitHub Container Registry or build the image yourself using the provided Dockerfile.
- Docker and Docker Compose installed on your system (see Docker Installation Guide)
- A terminal or command line interface to run Docker commands
The recommended way to set up the Virtual-Klipper-Printer is to use the pre-built Docker image available on GitHub Container Registry. This method is simpler and faster, as it does not require building the image yourself.
- Clone this repository
- Open a terminal in the cloned folder
- Run
docker compose up -d
to build the docker image and start the container in detached mode
This option allows you to build the Docker image from the provided Dockerfile. This is useful if you want to customize the image or if you prefer to build it yourself. It's possible to change the Klipper Repo URL with this method.
- Clone this repository
- Rename the
docker-compose.build.yml
file todocker-compose.override.yml
- Edit the
docker-compose.override.yml
file to change theKLIPPER_REPO_URL
variable to your desired Klipper repository URL (default is the official Klipper repository) - Open a terminal in the cloned folder
- Run
docker compose up -d --build
to build the docker image and start the container in detached mode
To configure a dummy-webcam, use the following URLs:
- Stream:
http://localhost:8110/?action=stream
- Snapshot:
http://localhost:8110/?action=snapshot
- Get all container IDs:
docker ps -a
- Get only the ID of running containers:
docker ps
- Access a containers shell:
docker exec -it <CONTAINER ID> bash
- Start/Restart/Stop a container:
docker container start/restart/stop <CONTAINER ID>
- Remove a container:
docker container rm <CONTAINER ID>