Open brogers5 opened 4 years ago
Ran into this same problem in another project and pushed another commit implementing a solution I liked better: adding a .gitattributes
file to force a specific line-ending for Bash scripts, regardless of how Git is configured. This ought to enable a more hands-off approach.
The last image was pushed 5 months ago to Docker Hub, and qBittorrent has since become out-of-date by a few releases. Given this, I figured I'd build my own image so I could use the latest version.
In the process, I initially encountered some run-time failures when starting the container:
The root cause ended up being that I had Git for Windows configured to checkout text files (including this script) with Windows-style line-endings, as officially recommended for Windows users. Thankfully, this is a simple fix: checkout with Unix-style line-endings instead, preferably on a per-repository basis.
I added a quick blurb to the README instructing Windows users to clone accordingly to work around this.