Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Dockerize project #2

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

CodexHere
Copy link

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™

* 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.
@alemidev
Copy link
Owner

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 (:

@CodexHere
Copy link
Author

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:

  1. 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.

  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants