<spanclass="line"><span>cd qmk_firmware</span></span></code></pre></div><p>Run the following command to build a keymap:</p><divclass="language- vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang"></span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><span>util/docker_build.sh <keyboard>:<keymap></span></span>
<spanclass="line"><span># For example: util/docker_build.sh planck/rev6:default</span></span></code></pre></div><p>This will compile the desired keyboard/keymap and leave the resulting <code>.hex</code> or <code>.bin</code> file in the QMK directory for you to flash. If <code>:keymap</code> is omitted, all keymaps are used. Note that the parameter format is the same as when building with <code>make</code>.</p><p>There is also support for building <em>and</em> flashing the keyboard straight from Docker by specifying the <code>target</code> as well:</p><divclass="language- vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang"></span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><span>util/docker_build.sh keyboard:keymap:target</span></span>
<spanclass="line"><span># For example: util/docker_build.sh planck/rev6:default:flash</span></span></code></pre></div><p>Note that mass storage bootloaders are not supported by the <code>flash</code> target. In this case you will have to manually copy the firmware file to the keyboard.</p><p>You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:</p><divclass="language- vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang"></span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><span>util/docker_build.sh</span></span>
<spanclass="line"><span># Reads parameters as input (leave blank for all keyboards/keymaps)</span></span></code></pre></div><p>You can manually set which container runtime you want to use by setting the <code>RUNTIME</code> environment variable to it's name or path. By default docker or podman are automatically detected and docker is preferred over podman.</p><divclass="language- vp-adaptive-theme"><buttontitle="Copy Code"class="copy"></button><spanclass="lang"></span><preclass="shiki shiki-themes github-light github-dark vp-code"><code><spanclass="line"><span>RUNTIME="podman" util/docker_build.sh keyboard:keymap:target</span></span></code></pre></div><h2id="faq"tabindex="-1">FAQ <aclass="header-anchor"href="#faq"aria-label="Permalink to "FAQ""></a></h2><h3id="why-can-t-i-flash-on-windows-macos"tabindex="-1">Why can't I flash on Windows/macOS <aclass="header-anchor"href="#why-can-t-i-flash-on-windows-macos"aria-label="Permalink to "Why can't I flash on Windows/macOS""></a></h3><p>On Windows and macOS, it requires <ahref="http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/"target="_blank"rel="noreferrer">Docker Machine</a> to be running. This is tedious to set up, so it's not recommended; use <ahref="https://github.com/qmk/qmk_toolbox"target="_blank"rel="noreferrer">QMK Toolbox</a> instead.</p><divclass="warning custom-block"><pclass="custom-block-title">WARNING</p><p>Docker for Windows requires <ahref="https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v"target="_blank"rel="noreferrer">Hyper-V</a> to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and <strong>Windows 10 Home</strong>.</p></div></div></div></main><footerclass="VPDocFooter"data-v-39a288b8data-v-09de1c0f><!--[--><!--]--><divclass="edit-info"data-v-09de1c0f><divclass="edit-link"data-v-09de1c0f><aclass="VPLink link vp-external-link-icon no-icon edit-link-button"href="https://github.com/qmk/qmk_firmware/edit/master/docs/getting_started_docker.md"target="_blank"rel="noreferrer"data-v-09de1c0f><!--[--><spanclass="vpi-square-pen edit-link-icon"data-v-09de1c0f></span> Edit this page<!--]--></a></div><!----></div><navclass="prev-next"data-v-09de1c0f><divclass="pager"data-v-09de1c0f><aclass="VPLink link pager-link prev"href="/keymap"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Previous page</span><spanclass="title"data-v-09de1c0f>Keymap Overview</span><!--]--></a></div><divclass="pager"data-v-09de1c0f><aclass="VPLink link pager-link next"href="/flashing"data-v-09de1c0f><!--[--><spanclass="desc"data-v-09de1c0f>Next page</span><spanclass="title"data-v-09de1c0f>Flashing</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>