From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Sat, 8 Jun 2024 13:05:26 +0000 (+0100) Subject: Limit maximum open file handles in Docker images. Increase the level of optimisation... X-Git-Tag: 4.3.4~1^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=111e247b657923a04ce2374dba2fd95841072329;p=thirdparty%2Fshairport-sync.git Limit maximum open file handles in Docker images. Increase the level of optimisation while building the Shairport Sync image. --- diff --git a/docker/Dockerfile b/docker/Dockerfile index c6da2efd..e47dc5d7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 diff --git a/docker/classic/Dockerfile b/docker/classic/Dockerfile index d5978410..d41cac4f 100644 --- a/docker/classic/Dockerfile +++ b/docker/classic/Dockerfile @@ -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 diff --git a/docker/classic/etc/s6-overlay/s6-rc.d/01-startup/script.sh b/docker/classic/etc/s6-overlay/s6-rc.d/01-startup/script.sh index 3037e98a..253c0afa 100644 --- a/docker/classic/etc/s6-overlay/s6-rc.d/01-startup/script.sh +++ b/docker/classic/etc/s6-overlay/s6-rc.d/01-startup/script.sh @@ -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 diff --git a/docker/etc/s6-overlay/s6-rc.d/01-startup/script.sh b/docker/etc/s6-overlay/s6-rc.d/01-startup/script.sh index 3037e98a..253c0afa 100644 --- a/docker/etc/s6-overlay/s6-rc.d/01-startup/script.sh +++ b/docker/etc/s6-overlay/s6-rc.d/01-startup/script.sh @@ -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