Skip to content
This repository was archived by the owner on Jun 21, 2022. It is now read-only.
This repository was archived by the owner on Jun 21, 2022. It is now read-only.

Support for WSL #5

@lars18th

Description

@lars18th

Hi,

This tool is great! Thank you @Andy2244 for it! 👍

However, it has troubles when running in:

  • Windows 10 with WSL and Docker for Windows in Linux mode.

Let me to explain:

  • I hate PowerShell, this shell is a pain! I prefer to use Bash in WSL.
  • To run the builder.ps1 in Windows 10 you need to execute first powershell Set-ExecutionPolicy Unrestricted, and this isn't documented!
  • When running the powershell script with Docker for Windows (and not with Windows Containers) then you found this error:
    Error response from daemon: invalid mount config for type "bind": invalid mount path: 'C:/Users/me/openwrt/openwrt-package-builder-1.0.2' mount path must be absolute
  • I can't switch to Windows Containers as my current environment uses Docker for Windows using the regular mode for running other docker images. So the switch is impossible.
  • When executing the script builder.sh inside WSL you have troubles with sudo as it doesn't exists.
  • When executing the script builder.sh inside WSL you have troubles as the command "docker" doesn't call to "docker.exe" (the native executable). You need to declare alias docker=docker.exe.
  • When executing the script builder.sh inside WSL you have troubles as the script detects some syntax errors.

So, in this enviroment these scripts are useless.
I suggest to improve it in one of these ways:

  1. Add support for WSL with a new builder-wsl.sh script.
  2. OR, add support in builder.ps1 for Docker for Windows and document the powershell Set-ExecutionPolicy Unrestricted requirement.
  3. OR, enhance the builder.sh script to support: different docker binary, Windows host, etc.
  4. OR, move the script to a docker image with docker-in-docker.

I don't know what's the best. I hope you will consider at some point to implement one of them.
Thank you for this project!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions