Skip to content

Commit

Permalink
Limit maximum open file handles in Docker images. Increase the level …
Browse files Browse the repository at this point in the history
…of optimisation while building the Shairport Sync image.
  • Loading branch information
mikebrady committed Jun 8, 2024
1 parent 2456dcc commit 111e247
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ COPY . .
RUN git checkout "$SHAIRPORT_SYNC_BRANCH"
WORKDIR /shairport-sync/build
RUN autoreconf -i ../
RUN ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=openssl \
RUN CFLAGS="-O3" CXXFLAGS="-O3" ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=openssl \
--with-airplay-2 --with-metadata --with-dummy --with-pipe --with-dbus-interface \
--with-stdout --with-mpris-interface --with-mqtt-client \
--with-apple-alac --with-convolution
Expand Down
2 changes: 1 addition & 1 deletion docker/classic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ COPY . .
RUN git checkout "$SHAIRPORT_SYNC_BRANCH"
WORKDIR /shairport-sync/build
RUN autoreconf -i ../
RUN ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=mbedtls \
RUN CFLAGS="-O3" CXXFLAGS="-O3" ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=mbedtls \
--with-metadata --with-dummy --with-pipe --with-dbus-interface \
--with-stdout --with-mpris-interface --with-mqtt-client \
--with-apple-alac --with-convolution
Expand Down
3 changes: 3 additions & 0 deletions docker/classic/etc/s6-overlay/s6-rc.d/01-startup/script.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/sh
echo "STARTING - $(date)"

# Set the limit to the same value Docker has been using in earlier version.
ulimit -n 1048576
3 changes: 3 additions & 0 deletions docker/etc/s6-overlay/s6-rc.d/01-startup/script.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
#!/bin/sh
echo "STARTING - $(date)"

# Set the limit to the same value Docker has been using in earlier version.
ulimit -n 1048576

0 comments on commit 111e247

Please sign in to comment.