-
-
Notifications
You must be signed in to change notification settings - Fork 583
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
Update docker compose file #1812
Conversation
Set to 28 days.
Added S6_KEEP_ENV to example, without it pulse connection won't happen
IMO this should be the default behaviour in the Dockerfile, could be achieved with:
I'm effectively doing the latter in my compose file: https://github.com/rmounce/ledfx-airplay-compose/blob/main/docker-compose.yml |
I'm wondering for any potential drawbacks for having this by default in the Dockerfile. Usually it's better to have fewer exposes by default. |
Thanks for this PR. I am not a Docker maven, I'm afraid, and I wonder what Noel Hibbard's (@noelhibbard) view might be. |
I'm not doing anything special to get PA to work. My My docker compose has this volume in it: I don't set any environment vars in my docker compose and I don't even set the pa server within |
Well, maybe this works, bot only in case you disabled auth and shairport-sync uses default PA connection as |
Thanks for these contributions. What is the effect of the |
Let me try to add a bit of context here. So, if one run the container from the shairport-sync image, providing env variables, they'd go to the container context, for example: NAME=shairport-sync
IMAGE=mikebrady/shairport-sync:latest
CONTAINER_PULSE_RUNTIME_DIR=/tmp/pulse
CONTAINER_SOCKET_PATH=$CONTAINER_PULSE_RUNTIME_DIR/native
CONTAINER_PULSE_COOKIE=$CONTAINER_PULSE_RUNTIME_DIR/cookie
docker run -d --restart unless-stopped \
--name ${NAME} \
--net=host \
-e PULSE_SERVER=$CONTAINER_SOCKET_PATH \
-e PULSE_COOKIE=$CONTAINER_PULSE_COOKIE \
-v /run/user/1000/pulse/:$CONTAINER_PULSE_RUNTIME_DIR \
-v /home/pi/.config/pulse/cookie:$CONTAINER_PULSE_COOKIE \
${IMAGE} -X -o pa --statistics After that, if one would go to the container via docker exec and do Another option might be to change image build process as @rmounce suggested, but I'm not sure if this should be changed, as most of the users may not use env vars at all. |
What is odd is I added a test env variable to my docker compose and it shows up in the container and I am NOT using
I'm not opposed to adding |
For example I can start a new container like this: Then I can print the environment like this: And I get this:
|
I see now.. I missed this part:
|
Thanks @HNKNTA and @noelhibbard.
I'll add this to the Docker image Real Soon Now™. |
Actually, @HNKNTA, if you would be kind enough to target this PR at the |
Changed the target branch. |
Many thanks! |
Added S6_KEEP_ENV to example, without it pulse connection won't happen