{"id":18262963,"url":"https://github.com/betaflight/docker-betaflight-build","last_synced_at":"2025-10-12T20:39:07.322Z","repository":{"id":54976357,"uuid":"73681294","full_name":"betaflight/docker-betaflight-build","owner":"betaflight","description":"Docker container that contains everything required to build the Betaflight firmware","archived":false,"fork":false,"pushed_at":"2021-10-14T14:13:14.000Z","size":40,"stargazers_count":40,"open_issues_count":4,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-20T18:11:15.528Z","etag":null,"topics":["betaflight","docker"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/betaflight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-14T08:03:31.000Z","updated_at":"2025-03-19T09:55:27.000Z","dependencies_parsed_at":"2022-08-14T08:00:27.380Z","dependency_job_id":null,"html_url":"https://github.com/betaflight/docker-betaflight-build","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/betaflight%2Fdocker-betaflight-build","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betaflight%2Fdocker-betaflight-build/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betaflight%2Fdocker-betaflight-build/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betaflight%2Fdocker-betaflight-build/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/betaflight","download_url":"https://codeload.github.com/betaflight/docker-betaflight-build/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247246236,"owners_count":20907755,"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":["betaflight","docker"],"created_at":"2024-11-05T11:09:30.594Z","updated_at":"2025-10-12T20:39:02.289Z","avatar_url":"https://github.com/betaflight.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Betaflight build\n[![Docker Pulls](https://img.shields.io/docker/pulls/betaflight/betaflight-build.svg)](https://hub.docker.com/r/betaflight/betaflight-build/) [![Docker Stars](https://img.shields.io/docker/stars/betaflight/betaflight-build.svg)](https://hub.docker.com/r/betaflight/betaflight-build/) [![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg?style=flat)](https://github.com/betaflight/betaflight-build/blob/master/LICENSE)\n\n_(Markdown optimised for display in [Dockerhub](https://hub.docker.com/r/betaflight/betaflight-build).)_\n\nClone and edit [Betaflight](https://github.com/betaflight/betaflight) locally on your platform. This image will take it from there and turn your code into a binary which you then can flash to your flight controller with the [Betaflight Configurator](https://github.com/betaflight/betaflight-configurator).\n\n## Usage\n### Install Docker\nThe latest docker platform is available from [https://www.docker.com/](https://www.docker.com/products/overview#/install_the_platform). If your system does not meet the system requirements for the latest version, check out the [Docker Toolbox](https://www.docker.com/products/docker-toolbox).\n\n### Clone the Betaflight repository\nDocker runs on a VirtualBox VM which by default only shares the user directory from the underlying guest OS. On Windows that is \u003ccode\u003ec:/Users/\u0026lt;user\u0026gt;\u003c/code\u003e and on Mac it's \u003ccode\u003e/Users/\u0026lt;user\u0026gt;\u003c/code\u003e. Hence, you need to clone the  [Betaflight](https://github.com/betaflight/betaflight) repository to your *user directory*. If you want to place it outside the user directory you need to adjust the [VirtualBox VM sharing settings](http://stackoverflow.com/q/33934776/131929) accordingly.\n\n### Run this image with Docker\nStart Docker and change into the Betaflight source directory (in the Docker console).\n\nFirst you need to set your working directory in Docker:\n\nFor Windows -\n\u003ccode\u003ecd /c/users/\u0026lt;user name\u0026gt;\u003c/code\u003e\n\nNext, Clone the Betaflight repository.\n(Note the below link is for the main Betaflight project.  If Cloning a workign Fork, you  will need to get the link from the GitHub website.)\n\nTo Clone a Github repository\n\u003ccode\u003egit clone https://github.com/betaflight/betaflight.git\u003c/code\u003e\n\nTo view Branches within a repository\n\u003ccode\u003egit branch -a\u003c/code\u003e\n\nTo checkout a branch\n\u003ccode\u003egit checkout \u0026lt;branch name\u0026gt;\u003c/code\u003e\n\nTo pull the branch to your local PC\n\u003ccode\u003egit pull\u003c/code\u003e\n\nThen run:\n\u003ccode\u003edocker run --rm -ti -v \\`pwd\\`:/opt/betaflight betaflight/betaflight-build\u003c/code\u003e\n\nDepending on the performance of your system it takes 1-3min until the compilation finishes. The first time you run this it takes longer because Docker needs to download the image and create a container.\n\n**Note for Windows users**\n\n(Docker on) Windows handles paths slightly differently. You need to specify the full path to the Betaflight directory in the command and you need to add an extra forward slash (\u003ccode\u003e/\u003c/code\u003e) to the Windows path. The command thus becomes (\u003ccode\u003ec\u003c/code\u003e equals C drive i.e. \u003ccode\u003ec:\u003c/code\u003e):\n\n\u003ccode\u003edocker run --rm -it -v c:/Users/\u0026lt;user\u0026gt;/\u0026lt;betaflight\u0026gt;:/opt/betaflight betaflight/betaflight-build\u003c/code\u003e\n\nIf the Windows path contains spaces it would have to be wrapped in quotes as usual on Windows.\n\n\u003ccode\u003edocker run --rm -it -v \"c:/Users/joe blogs/\u0026lt;betaflight\u0026gt;\":/opt/betaflight betaflight/betaflight-build\u003c/code\u003e\n\n#### Output\nThe firmware file (\u003ccode\u003e.bin\u003c/code\u003e or \u003ccode\u003e.hex\u003c/code\u003e) is created in the \u003ccode\u003eobj\u003c/code\u003e subfolder of your betaflight source directory.\n\n#### Options\nYou can pass optional parameters to the Docker build like so:\n\n\u003ccode\u003edocker run -e \"\u0026lt;parameter\u0026gt;=value\" --rm -it -v \\`pwd\\`:/opt/betaflight betaflight/betaflight-build\u003c/code\u003e \n\nFor Windows:\n\u003ccode\u003edocker run -e \"parameter=\u0026lt;value\u0026gt;\" --rm -it -v c:/Users/\u0026lt;user\u0026gt;/\u0026lt;any sub-directory names\u0026gt;/betaflight:/opt/betaflight betaflight/betaflight-build\u003c/code\u003e \n\nThese parameters are supported:\n\n- \u003ccode\u003eTARGET=\u0026lt;target name\u0026gt;\u003c/code\u003e: The platform (target) to build, e.g. \u003ccode\u003eTARGET=STM32F7X2\u003c/code\u003e;\n- \u003ccode\u003eOPTIONS=\u0026lt;options\u0026gt;\u003c/code\u003e: specify build options to be used as defines during the build.\n\nSpecial cases:\n- \u003ccode\u003eTARGET=all\u003c/code\u003e: build all targets (may take a long time);\n- \u003ccode\u003eTARGET=test\u003c/code\u003e: build and run the unit tests;\n- \u003ccode\u003eTARGET=unified\u003c/code\u003e: build all Unified Targets;\n- \u003ccode\u003eTARGET=unified\\zip\u003c/code\u003e: build all Unified Targets and pack them into ZIP files (good for adding to GitHub issues);\n- \u003ccode\u003eTARGET=pre-push\u003c/code\u003e: build representative targets and build and run the tests (**do this to check that your changes do not introduce build failures every time before opening a pull request**).\n\n### Flashing the built binary\nUse the [Betaflight Configurator](https://chrome.google.com/webstore/detail/betaflight-configurator/kdaghagfopacdngbohiknlhcocjccjao) Chrome app to flash and configure your firmware.\n\n## Support\nDon't leave comments on Docker Hub that are intended to be support requests, since Docker Hub doesn't send notifications when you write them. Instead create an issue on [GitHub](https://github.com/betaflight/docker-betaflight-build/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetaflight%2Fdocker-betaflight-build","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetaflight%2Fdocker-betaflight-build","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetaflight%2Fdocker-betaflight-build/lists"}