Skip to content

Commit

Permalink
Updated containers to Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiromMakkad committed Mar 17, 2021
1 parent 06e2ec8 commit 28094d7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rcarmo/ubuntu-python
FROM python:3.9-slim-buster

WORKDIR /app

Expand All @@ -16,6 +16,11 @@ RUN pip install git+https://github.com/LedFx/LedFx
RUN apt-get install -y pulseaudio alsa-utils
RUN adduser root pulse-access

RUN apt-get install -y wget \
libavahi-client3 \
libavahi-common3 \
apt-utils

RUN apt-get install -y squeezelite

COPY setup-files/ /app/
Expand Down
7 changes: 6 additions & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rcarmo/ubuntu-python
FROM python:3.9-slim-buster

WORKDIR /app

Expand All @@ -16,6 +16,11 @@ RUN pip install git+https://github.com/LedFx/LedFx@dev
RUN apt-get install -y pulseaudio alsa-utils
RUN adduser root pulse-access

RUN apt-get install -y wget \
libavahi-client3 \
libavahi-common3 \
apt-utils

RUN apt-get install -y squeezelite

COPY setup-files/ /app/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
image: shirom/ledfx
container_name: ledfx
environment:
- HOST=host.docker.internal
- HOST=192.168.0.15
- FORMAT=-r 44100 -f S16_LE -c 2
- SQUEEZE=1
ports:
Expand All @@ -44,7 +44,7 @@ Volume | Function
Each variable corresponds to a different input method. One of the two variables must be set to send audio into the container (or you can set both).
Variable | Function
--- | --------
`HOST` | This is the IP of the Snapcast server. Keep in mind that this IP is resolved from inside the container unless you use [host networking](https://docs.docker.com/network/host/). To refer to other docker containers in [bridge networking](https://docs.docker.com/network/bridge/) (the default for any two containers in the same compose file), just use the name of the container. To refer to `127.0.0.1` use `host.docker.internal`.
`HOST` | This is the IP of the Snapcast server. Keep in mind that this IP is resolved from inside the container unless you use [host networking](https://docs.docker.com/network/host/). To refer to other docker containers in [bridge networking](https://docs.docker.com/network/bridge/) (the default for any two containers in the same compose file), just use the name of the container. To refer to `127.0.0.1` use `host.docker.internal` (compatibilty varies greatly between platforms and versions).
`FORMAT` | This variable specifies the format of the audio coming into `/app/audio/stream`. It can use any of the options defined in [aplay](https://linux.die.net/man/1/aplay). The example shown above corresponds to 44100hz, 16 bits, and 2 channels, the default for most applications.
`SQUEEZE` | Setting this variable to `1` allows this image to act as a [squeezelite](https://github.com/ralph-irving/squeezelite) client that can connect to a [Logitech Media Server](https://mysqueezebox.com/download).

Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ services:
ports:
- 8888:8888
volumes:
- ./ledfx-config:/app/ledfx-config
- ~/ledfx-config:/app/ledfx-config
- ~/audio:/app/audio
extra_hosts:
- "host.docker.internal:host-gateway"

0 comments on commit 28094d7

Please sign in to comment.