scope-tui
scope-tui copied to clipboard
Feature: Dockerize project
I found this project through a random post on X/Twitter, thought it was pretty cool, and for various reasons wanted to Dockerize the project.
- Added Dockerfile to build project
- Added docker-compose.yml for easy container orchestration
- Added helper shell script docker_start.sh to easily start and attach the container.
- Added dockerignore file to avoid over-including files.
- Minor update to README to include docker information.
I use pipewire on my host, but this project and the image utilize pulseaudio.
Works on my machine™
hey thanks a lot for your interest and contribution!
i really appreciate this PR but I think the containerization could be less complex once I get more backends working (other than pulseaudio)
i'm currently looking into rodio and cpal, both to support more platforms and to get better control over inputs
if it's fine by you, i'd rather wait this PR out a little, and come back to it later. ideally i'd like to drop it down to just 1 Dockerfile, i see why you provide a docker-compose (setup env and volumes) but hopefully those issues will be solved with more backends and the compose won't be necessary anymore (:
Feel free to do as you wish! It's your code, I was just throwing this out there cuz I thought it was neat 😅
But just as a retort to your comments, I'll throw out my 2 cents:
-
With the advent and inevitable ubiquity of Pipewire, there likely may not be any value in supporting other audio engines. Of course, you may have explicit goals that require this, but I've found pipewire to be pretty awesome.
-
There is only 1
Dockerfile. The compose file is, as you mentioned, for the mounts, but also environment variables, runtime flags, and lastly to auto build the image should it be missing. I haven't seen any sound engine working in Docker without a socket/cookie/config/etc mount, the compose file just makes it easier to spin up. You can run the docker image without the compose file, but you'll be required to manually build and include the volume flags/etc explicitly every launch:
docker build -t scope_tui:latest . &&
docker run --rm -it --name scope_tui -e "PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native" -v "${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native" -v "$HOME/.config/pulse/cookie:/.config/pulse/cookie" scope_tui
Just for posterity sake, I updated the PR to split out compose vs docker startup script.