forked from docker-library/redmine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-passenger.template
33 lines (28 loc) · 1.18 KB
/
Dockerfile-passenger.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM %%REDMINE%%
ENV PASSENGER_VERSION %%PASSENGER_VERSION%%
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"]