diff --git a/signal-server-patches/apply-patches.sh b/signal-server-patches/apply-patches.sh new file mode 100755 index 0000000..ab4e9e9 --- /dev/null +++ b/signal-server-patches/apply-patches.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -euo pipefail +for patch in /tmp/signal-server-patches/*.patch; do + echo "patch -p1 < \$patch" + patch -p1 < $patch +done diff --git a/signal-server.Dockerfile b/signal-server.Dockerfile index 3325a8b..3c9bf5a 100644 --- a/signal-server.Dockerfile +++ b/signal-server.Dockerfile @@ -3,7 +3,7 @@ RUN apt-get update && apt-get install -y openjdk-8-jdk-headless maven git RUN git -C /usr/local/src clone https://github.com/signalapp/Signal-Server WORKDIR /usr/local/src/Signal-Server COPY signal-server-patches /tmp/signal-server-patches -RUN bash -exc "for patch in /tmp/signal-server-patches/*.patch; do patch -p1 $patch; done" +RUN /tmp/signal-server-patches/apply-patches.sh RUN mvn install -DskipTests RUN ls -lha target