{"id":13442989,"url":"https://github.com/lukechilds/dockerpi","last_synced_at":"2025-05-15T14:08:22.844Z","repository":{"id":50220921,"uuid":"227831803","full_name":"lukechilds/dockerpi","owner":"lukechilds","description":"A Virtualised Raspberry Pi inside a Docker image","archived":false,"fork":false,"pushed_at":"2023-12-21T13:09:35.000Z","size":87,"stargazers_count":1924,"open_issues_count":44,"forks_count":206,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-07T17:06:20.065Z","etag":null,"topics":["arm","container","docker","docker-image","qemu","raspberry-pi","virtual-machine","vm"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukechilds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["lukechilds"],"custom":["https://blockstream.info/address/1LukeQU5jwebXbMLDVydeH4vFSobRV9rkj","https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w","https://blockstream.info/address/bc1qlukeyq0c69v97uss68fet26kjkcsrymd2kv6d4","https://tippin.me/@lukechilds?refurl=github.com/lukechilds/dockerpi"]}},"created_at":"2019-12-13T12:08:30.000Z","updated_at":"2025-04-02T14:28:25.000Z","dependencies_parsed_at":"2024-01-08T08:04:01.223Z","dependency_job_id":null,"html_url":"https://github.com/lukechilds/dockerpi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fdockerpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fdockerpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fdockerpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fdockerpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukechilds","download_url":"https://codeload.github.com/lukechilds/dockerpi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355335,"owners_count":22057354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","container","docker","docker-image","qemu","raspberry-pi","virtual-machine","vm"],"created_at":"2024-07-31T03:01:54.436Z","updated_at":"2025-05-15T14:08:17.818Z","avatar_url":"https://github.com/lukechilds.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/lukechilds","https://blockstream.info/address/1LukeQU5jwebXbMLDVydeH4vFSobRV9rkj","https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w","https://blockstream.info/address/bc1qlukeyq0c69v97uss68fet26kjkcsrymd2kv6d4","https://tippin.me/@lukechilds?refurl=github.com/lukechilds/dockerpi"],"categories":["Dockerfile","raspberry-pi"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003cimg width=\"256\" src=\"media/logo.svg\"\u003e\n\u003c/div\u003e\n\n# dockerpi\n\n[![Docker Pulls](https://badgen.net/docker/pulls/lukechilds/dockerpi?icon=docker\u0026label=Docker%20pulls)](https://hub.docker.com/r/lukechilds/dockerpi/)\n[![Docker Image Size](https://badgen.net/docker/size/lukechilds/dockerpi/latest/amd64?icon=docker\u0026label=lukechilds/dockerpi)](https://hub.docker.com/r/lukechilds/dockerpi/tags)\n[![GitHub Donate](https://badgen.net/badge/GitHub/Sponsor/D959A7?icon=github)](https://github.com/sponsors/lukechilds)\n[![Bitcoin Donate](https://badgen.net/badge/Bitcoin/Donate/F19537?icon=bitcoin)](https://lu.ke/tip/bitcoin)\n[![Lightning Donate](https://badgen.net/badge/Lightning/Donate/F6BC41?icon=bitcoin-lightning)](https://lu.ke/tip/lightning)\n\n\u003e A Virtualised Raspberry Pi inside a Docker image\n\nGives you access to a virtualised ARM based Raspberry Pi machine running the Raspian operating system.\n\nThis is not just a Raspian Docker image, it's a full ARM based Raspberry Pi virtual machine environment.\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cimg src=\"media/demo.svg\" width=\"720\"\u003e\n\u003c/div\u003e\n\n## Usage\n\n```\ndocker run -it lukechilds/dockerpi\n```\n\nBy default all filesystem changes will be lost on shutdown. You can persist filesystem changes between reboots by mounting the `/sdcard` volume on your host:\n\n```\ndocker run -it -v $HOME/.dockerpi:/sdcard lukechilds/dockerpi\n```\n\nIf you have a specific image you want to mount you can mount it at `/sdcard/filesystem.img`:\n\n```\ndocker run -it -v /2019-09-26-raspbian-buster-lite.img:/sdcard/filesystem.img lukechilds/dockerpi\n```\n\nIf you only want to mount your own image, you can download a much slimmer VM only Docker container that doesn't contain the Raspbian filesystem image:\n\n[![Docker Image Size](https://badgen.net/docker/size/lukechilds/dockerpi/latest/amd64?icon=docker\u0026label=lukechilds/dockerpi:latest)](https://hub.docker.com/r/lukechilds/dockerpi/tags?name=latest)\n[![Docker Image Size](https://badgen.net/docker/size/lukechilds/dockerpi/vm/amd64?icon=docker\u0026label=lukechilds/dockerpi:vm)](https://hub.docker.com/r/lukechilds/dockerpi/tags?name=vm)\n\n```\ndocker run -it -v /2019-09-26-raspbian-buster-lite.img:/sdcard/filesystem.img lukechilds/dockerpi:vm\n```\n\n## Which machines are supported?\n\nBy default a Raspberry Pi 1 is virtualised, however experimental support has been added for Pi 2 and Pi 3 machines.\n\nYou can specify a machine by passing the name as a CLI argument:\n\n```\ndocker run -it lukechilds/dockerpi pi1\ndocker run -it lukechilds/dockerpi pi2\ndocker run -it lukechilds/dockerpi pi3\n```\n\n\u003e **Note:** In the Pi 2 and Pi 3 machines, QEMU hangs once the machines are powered down requiring you to `docker kill` the container. See [#4](https://github.com/lukechilds/dockerpi/pull/4) for details.\n\n\n## Wait, what?\n\nA full ARM environment is created by using Docker to bootstrap a QEMU virtual machine. The Docker QEMU process virtualises a machine with a single core ARM11 CPU and 256MB RAM, just like the Raspberry Pi. The official Raspbian image is mounted and booted along with a modified QEMU compatible kernel.\n\nYou'll see the entire boot process logged to your TTY until you're prompted to log in with the username/password pi/raspberry.\n\n```\npi@raspberrypi:~$ uname -a\nLinux raspberrypi 4.19.50+ #1 Tue Nov 26 01:49:16 CET 2019 armv6l GNU/Linux\npi@raspberrypi:~$ cat /etc/os-release | head -n 1\nPRETTY_NAME=\"Raspbian GNU/Linux 10 (buster)\"\npi@raspberrypi:~$ cat /proc/cpuinfo\nprocessor       : 0\nmodel name      : ARMv6-compatible processor rev 7 (v6l)\nBogoMIPS        : 798.31\nFeatures        : half thumb fastmult vfp edsp java tls\nCPU implementer : 0x41\nCPU architecture: 7\nCPU variant     : 0x0\nCPU part        : 0xb76\nCPU revision    : 7\n\nHardware        : ARM-Versatile (Device Tree Support)\nRevision        : 0000\nSerial          : 0000000000000000\npi@raspberrypi:~$ free -h\n              total        used        free      shared  buff/cache   available\nMem:          246Mi        20Mi       181Mi       1.0Mi        44Mi       179Mi\nSwap:          99Mi          0B        99Mi\n```\n\n## Build\n\nBuild this image yourself by checking out this repo, `cd` ing into it and running:\n\n```\ndocker build -t lukechilds/dockerpi .\n```\n\nBuild the VM only image with:\n\n```\ndocker build -t lukechilds/dockerpi:vm --target dockerpi-vm .\n```\n\n## Credit\n\nThanks to [@dhruvvyas90](https://github.com/dhruvvyas90) for his [dhruvvyas90/qemu-rpi-kernel](https://github.com/dhruvvyas90/qemu-rpi-kernel) repo.\n\n## License\n\nMIT © Luke Childs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukechilds%2Fdockerpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukechilds%2Fdockerpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukechilds%2Fdockerpi/lists"}