From 6c34e84bd76fbcbab6e0629b32229dad6485bfe6 Mon Sep 17 00:00:00 2001 From: apankratiev-syberry <82646265+apankratiev-syberry@users.noreply.github.com> Date: Wed, 15 Feb 2023 16:34:43 +0300 Subject: [PATCH] Add passenger image for redmine 5.0.4 --- 5.0/passenger/Dockerfile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 5.0/passenger/Dockerfile diff --git a/5.0/passenger/Dockerfile b/5.0/passenger/Dockerfile new file mode 100644 index 0000000..692bd42 --- /dev/null +++ b/5.0/passenger/Dockerfile @@ -0,0 +1,33 @@ +FROM redmine:5.0.4 + +ENV PASSENGER_VERSION 6.0.17 + +RUN set -eux; \ + \ + savedAptMark="$(apt-mark showmanual)"; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + gcc \ + make \ + ; \ + rm -rf /var/lib/apt/lists/*; \ + \ + gem install passenger --version "$PASSENGER_VERSION"; \ +# pre-build "passenger_native_support.so" while we have the compiler toolchain available + passenger-config build-native-support; \ +# the above command always exits with a zero exit code, but if we run it again and it was successful, it'll have empty output (that's the best way I can find to verify that it's worked) + if [ -n "$(passenger-config build-native-support 2>&1)" ]; then cat /tmp/passenger_native_support-*.log; false; fi; \ + \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false + +# pre-download the PassengerAgent and the NGINX engine +RUN set -eux; \ + passenger-config install-agent; \ + passenger-config download-nginx-engine + +# adjust Passenger to write the PID to the same file as "rails server" +ENV PASSENGER_PID_FILE tmp/pids/server.pid + +CMD ["passenger", "start"]