diff options
author | QMK Bot <[email protected]> | 2025-01-15 19:36:54 +0000 |
---|---|---|
committer | QMK Bot <[email protected]> | 2025-01-15 19:36:54 +0000 |
commit | 1174d16b5aaa08947908245ffe8c31327e91f32e (patch) | |
tree | d7a9cf86255d895f855860b7954f9dacec6653c7 | |
parent | 7f1c236c75b0a92b952882c6f211f78157978f63 (diff) | |
parent | 7b83bb9d267fc4f2909cb87965d873487a9a4e1d (diff) | |
download | qmk_firmware-develop.tar.gz qmk_firmware-develop.zip |
-rw-r--r-- | docs/getting_started_docker.md | 7 | ||||
-rwxr-xr-x | util/docker_cmd.sh | 20 |
2 files changed, 18 insertions, 9 deletions
diff --git a/docs/getting_started_docker.md b/docs/getting_started_docker.md index 2d90d8566a..42322397b4 100644 --- a/docs/getting_started_docker.md +++ b/docs/getting_started_docker.md @@ -50,6 +50,13 @@ By default docker or podman are automatically detected and docker is preferred o RUNTIME="podman" util/docker_build.sh keyboard:keymap:target ``` +If flashing is not required, it's possible to run the container as unprivileged (on Linux), and without docker-machine (on Windows/macOS): + +``` +SKIP_FLASHING_SUPPORT=1 util/docker_build.sh keyboard:keymap:target +``` + + ## FAQ ### Why can't I flash on Windows/macOS diff --git a/util/docker_cmd.sh b/util/docker_cmd.sh index 18725db068..cb0c4f3281 100755 --- a/util/docker_cmd.sh +++ b/util/docker_cmd.sh @@ -34,15 +34,17 @@ if [ -z "$RUNTIME" ]; then fi fi - -# IF we are using docker on non Linux and docker-machine isn't working print an error -# ELSE set usb_args -if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then - errcho "Error: target requires docker-machine to work on your platform" - errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" - exit 3 -else - usb_args="--privileged -v /dev:/dev" +# If SKIP_FLASHING_SUPPORT is defined, do not check for docker-machine and do not run a privileged container +if [ -z "$SKIP_FLASHING_SUPPORT" ]; then + # IF we are using docker on non Linux and docker-machine isn't working print an error + # ELSE set usb_args + if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then + errcho "Error: target requires docker-machine to work on your platform" + errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" + exit 3 + else + usb_args="--privileged -v /dev:/dev" + fi fi qmk_firmware_dir=$(pwd -W 2>/dev/null) || qmk_firmware_dir=$PWD # Use Windows path if on Windows |