-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed unofficial phpldapadmin dependencies
- Loading branch information
Daniel Bader
committed
Jun 9, 2017
1 parent
82e7230
commit 974ee00
Showing
4 changed files
with
99 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,40 @@ | ||
FROM dinkel/nginx-phpfpm:8.2 | ||
|
||
MAINTAINER Christian Luginbühl <[email protected]> | ||
FROM debian:jessie | ||
|
||
ENV NGINX_VERSION 1.6.2 | ||
ENV PHP_VERSION 5.6.30 | ||
ENV PHPLDAPADMIN_VERSION 1.2.2 | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
phpldapadmin=${PHPLDAPADMIN_VERSION}* && \ | ||
ca-certificates \ | ||
nginx=${NGINX_VERSION}* \ | ||
php5-fpm=${PHP_VERSION}* && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ln -sf /usr/share/phpldapadmin /var/www | ||
RUN ln -sf /dev/stdout /var/log/nginx/access.log && \ | ||
ln -sf /dev/stderr /var/log/nginx/error.log && \ | ||
ln -sf /dev/stderr /var/log/php-fpm.log | ||
|
||
RUN rm -rf /var/www/ | ||
|
||
COPY nginx.conf /etc/nginx/ | ||
|
||
COPY default.conf /etc/nginx/conf.d/ | ||
|
||
COPY www.conf /etc/php5/fpm/pool.d/ | ||
|
||
EXPOSE 80 | ||
|
||
COPY run.sh / | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||
phpldapadmin=${PHPLDAPADMIN_VERSION}* && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN ln -sf /usr/share/phpldapadmin /var/www | ||
|
||
RUN mv /var/www/config/config.php.example /var/www/config/config.php | ||
|
||
|
@@ -20,7 +44,9 @@ COPY www.conf /etc/php5/fpm/pool.d/ | |
|
||
COPY bootstrap.sh / | ||
|
||
RUN chmod +x /run.sh | ||
RUN chmod +x /bootstrap.sh | ||
|
||
ENTRYPOINT ["/bootstrap.sh"] | ||
|
||
# This script comes from the parent image | ||
CMD ["/run.sh"] | ||
CMD ["/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
user www-data; | ||
worker_processes 1; | ||
|
||
pid /var/run/nginx.pid; | ||
|
||
daemon off; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
|
||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
log_format main '[$time_local] "$request" ($remote_addr - $remote_user) ' | ||
'$status $body_bytes_sent "$http_referer" ' | ||
'"$http_user_agent" "$http_x_forwarded_for"'; | ||
|
||
access_log /var/log/nginx/access.log main; | ||
error_log /var/log/nginx/error.log warn; | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
upstream php-handler { | ||
server unix:/var/run/php5-fpm.sock; | ||
} | ||
|
||
include /etc/nginx/conf.d/*.conf; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
set -m | ||
|
||
php5-fpm & | ||
nginx & | ||
|
||
pids=`jobs -p` | ||
|
||
exitcode=0 | ||
|
||
function terminate() { | ||
trap "" CHLD | ||
|
||
for pid in $pids; do | ||
if ! kill -0 $pid 2>/dev/null; then | ||
wait $pid | ||
exitcode=$? | ||
fi | ||
done | ||
|
||
kill $pids 2>/dev/null | ||
} | ||
|
||
trap terminate CHLD | ||
wait | ||
|
||
exit $exitcode |