-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
62 lines (52 loc) · 1.93 KB
/
Copy pathContainerfile
File metadata and controls
62 lines (52 loc) · 1.93 KB
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
52
53
54
55
56
57
58
59
60
61
62
ARG FREEBSD_RELEASE
FROM ghcr.io/appjail-makejails/core:${FREEBSD_RELEASE}
ARG APACHEVER
ARG PHPVER
ARG NO_PKGCLEAN
LABEL org.opencontainers.image.title="httpd" \
org.opencontainers.image.description="High performance Unix-based HTTP server" \
org.opencontainers.image.source="https://github.com/AppJail-makejails/apache" \
org.opencontainers.image.url="https://github.com/AppJail-makejails/apache" \
org.opencontainers.image.vendor="DtxdF" \
org.opencontainers.image.authors="Jesús Daniel Colmenares Oviedo <dtxdf@disroot.org>"
RUN set -xe -o pipefail; \
\
pkg update; \
pkg install -U apache${APACHEVER}; \
\
mkdir -p /usr/local/www/html; \
chmod 555 /usr/local/www/html; \
\
if [ -n "${PHPVER}" ]; then \
pkg install -U php${PHPVER} mod_php${PHPVER}; \
cp -v /usr/local/etc/php.ini-production /usr/local/etc/php.ini; \
{ \
echo -e '<FilesMatch \.php$>'; \
echo -e '\tSetHandler application/x-httpd-php'; \
echo -e '</FilesMatch>'; \
echo; \
echo -e 'DirectoryIndex disabled'; \
echo -e 'DirectoryIndex index.php index.html'; \
echo; \
echo -e '<Directory /usr/local/www/apache24/data/>'; \
echo -e '\tOptions -Indexes'; \
echo -e '\tAllowOverride All'; \
echo -e '</Directory>'; \
} | tee /usr/local/etc/apache24/Includes/appjail-php.conf; \
fi; \
\
if [ -z "${NO_PKGCLEAN}" ]; then \
pkg clean -a; \
rm -rf /var/cache/pkg/*; \
fi; \
rm -rf /var/db/pkg/repos/*; \
\
ln -sf /dev/stderr /var/log/httpd-error.log; \
ln -sf /dev/stdout /var/log/httpd-access.log; \
ln -sf /dev/stdout /var/log/httpd-ssl_request.log;
COPY httpd-foreground /usr/local/bin/httpd-foreground
RUN chmod +x /usr/local/bin/httpd-foreground
STOPSIGNAL SIGWINCH
WORKDIR /usr/local
EXPOSE 80
ENTRYPOINT ["httpd-foreground"]