Skip to content

Commit 111e247

Browse files
committed
Limit maximum open file handles in Docker images. Increase the level of optimisation while building the Shairport Sync image.
1 parent 2456dcc commit 111e247

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ COPY . .
5555
RUN git checkout "$SHAIRPORT_SYNC_BRANCH"
5656
WORKDIR /shairport-sync/build
5757
RUN autoreconf -i ../
58-
RUN ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=openssl \
58+
RUN CFLAGS="-O3" CXXFLAGS="-O3" ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=openssl \
5959
--with-airplay-2 --with-metadata --with-dummy --with-pipe --with-dbus-interface \
6060
--with-stdout --with-mpris-interface --with-mqtt-client \
6161
--with-apple-alac --with-convolution

docker/classic/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ COPY . .
4040
RUN git checkout "$SHAIRPORT_SYNC_BRANCH"
4141
WORKDIR /shairport-sync/build
4242
RUN autoreconf -i ../
43-
RUN ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=mbedtls \
43+
RUN CFLAGS="-O3" CXXFLAGS="-O3" ../configure --sysconfdir=/etc --with-alsa --with-pa --with-soxr --with-avahi --with-ssl=mbedtls \
4444
--with-metadata --with-dummy --with-pipe --with-dbus-interface \
4545
--with-stdout --with-mpris-interface --with-mqtt-client \
4646
--with-apple-alac --with-convolution
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
#!/bin/sh
22
echo "STARTING - $(date)"
3+
4+
# Set the limit to the same value Docker has been using in earlier version.
5+
ulimit -n 1048576
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
#!/bin/sh
22
echo "STARTING - $(date)"
3+
4+
# Set the limit to the same value Docker has been using in earlier version.
5+
ulimit -n 1048576

0 commit comments

Comments
 (0)