-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
executable file
·51 lines (41 loc) · 1.39 KB
/
Dockerfile.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM frugan/bitnami-php-fpm:%%TAG%%
### fatcontroller
#https://vsupalov.com/docker-arg-vs-env/
ARG FATCONTROLLER_VERSION=0.0.5
#https://askubuntu.com/a/871936/543855
ENV TERM xterm-256color
COPY patch /patch
RUN install_packages \
ca-certificates \
gcc \
libc-dev \
make \
patch \
tar \
wget \
; \
#https://www.includehelp.com/c-programming-questions/compiling-program-with-pthread-library-linux.aspx
#https://stackoverflow.com/a/15252756/3929620
wget --no-check-certificate -P /tmp https://downloads.sourceforge.net/project/fat-controller/fatcontroller-"${FATCONTROLLER_VERSION}".tar.gz; \
tar -zxvf /tmp/fatcontroller-"${FATCONTROLLER_VERSION}".tar.gz -C /tmp; \
\
cd /tmp/fatcontroller-"${FATCONTROLLER_VERSION}"/; \
make; \
make install; \
\
patch -d /etc/init.d -p0 -N --dry-run --silent fatcontrollerd /patch/fatcontrollerd.patch 2>/dev/null; \
\
# If the patch has not been applied, then the $?, which is the exit status,
# for last command would have a success status code = 0
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then \
# Apply the patch
patch -d /etc/init.d -p0 -N fatcontrollerd /patch/fatcontrollerd.patch; \
fi; \
\
rm -Rf /tmp/fatcontroller-* \
;
####
COPY entrypoint-after.sh /
#https://github.com/docker-library/postgres/issues/296#issuecomment-308735942
RUN chmod +x /entrypoint-after.sh