diff options
| author | Haim Gelfenbeyn <haim@g8n.me> | 2025-01-15 14:36:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-16 06:36:20 +1100 |
| commit | 7b83bb9d267fc4f2909cb87965d873487a9a4e1d (patch) | |
| tree | 8f7576f0f8990c50c7de35ac80defc3a381fd712 /util/docker_cmd.sh | |
| parent | 26f898c8a538b808cf506f558a9454f7f50e3ba6 (diff) | |
Allow running Docker container on MacOS (without in-container USB support) (#24412)
Diffstat (limited to 'util/docker_cmd.sh')
| -rwxr-xr-x | util/docker_cmd.sh | 20 |
1 files changed, 11 insertions, 9 deletions
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 | |||
| 34 | fi | 34 | fi |
| 35 | fi | 35 | fi |
| 36 | 36 | ||
| 37 | 37 | # If SKIP_FLASHING_SUPPORT is defined, do not check for docker-machine and do not run a privileged container | |
| 38 | # IF we are using docker on non Linux and docker-machine isn't working print an error | 38 | if [ -z "$SKIP_FLASHING_SUPPORT" ]; then |
| 39 | # ELSE set usb_args | 39 | # IF we are using docker on non Linux and docker-machine isn't working print an error |
| 40 | if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then | 40 | # ELSE set usb_args |
| 41 | errcho "Error: target requires docker-machine to work on your platform" | 41 | if [ ! "$(uname)" = "Linux" ] && [ "$RUNTIME" = "docker" ] && ! docker-machine active >/dev/null 2>&1; then |
| 42 | errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" | 42 | errcho "Error: target requires docker-machine to work on your platform" |
| 43 | exit 3 | 43 | errcho "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" |
| 44 | else | 44 | exit 3 |
| 45 | usb_args="--privileged -v /dev:/dev" | 45 | else |
| 46 | usb_args="--privileged -v /dev:/dev" | ||
| 47 | fi | ||
| 46 | fi | 48 | fi |
| 47 | 49 | ||
| 48 | qmk_firmware_dir=$(pwd -W 2>/dev/null) || qmk_firmware_dir=$PWD # Use Windows path if on Windows | 50 | qmk_firmware_dir=$(pwd -W 2>/dev/null) || qmk_firmware_dir=$PWD # Use Windows path if on Windows |
