Skip to content

Commit

Permalink
New image phpldapadmin
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo1003 committed Feb 20, 2024
1 parent c3b1659 commit d59c801
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/package-phpldapadmin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: "Package phpldapadmin"
on:
push:
branches:
- main
- test
- dev
paths:
- 'phpldapadmin/**'
workflow_dispatch: {}

jobs:
package-phpldapadmin:
uses: "./.github/workflows/package.yml"
with:
name: phpldapadmin
path: phpldapadmin
1 change: 1 addition & 0 deletions phpldapadmin/APP_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.2.6.7
43 changes: 43 additions & 0 deletions phpldapadmin/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM alpine:3.19

ARG APP_VERSION

RUN set -ex; \
apk add --no-cache \
apache2 \
curl \
shadow \
util-linux \
php82 \
php82-apache2 \
php82-ldap \
php82-gettext \
php82-mbstring \
php82-opcache \
php82-openssl \
php82-session \
php82-xml \
php82-pecl-apcu \
rm -f /etc/apache2/conf.d/info.conf; \
rm -f /etc/apache2/conf.d/userdir.conf; \
ln -sf /usr/bin/php82 /usr/bin/php;

COPY php.conf.d/ /etc/php82/conf.d/
COPY apache2.conf.d/ /etc/apache2/conf.d/

RUN set -ex; \
sed -i -e 's|^#\(LoadModule remoteip_module.*\)|\1|' /etc/apache2/httpd.conf

RUN set -ex; \
curl -fsSL -o "phpLDAPadmin-${APP_VERSION}.tar.gz" \
"https://github.com/leenooks/phpLDAPadmin/archive/${APP_VERSION}.tar.gz"; \
mkdir -p /var/www/phpldapadmin; \
tar -xzf "phpLDAPadmin-${APP_VERSION}.tar.gz" --strip-components=1 -C /var/www/phpldapadmin; \
rm "phpLDAPadmin-${APP_VERSION}.tar.gz";

COPY entrypoint.sh /

STOPSIGNAL SIGWINCH

ENTRYPOINT ["/entrypoint.sh"]
CMD ["httpd", "-DFOREGROUND"]
5 changes: 5 additions & 0 deletions phpldapadmin/apache2.conf.d/basic.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ServerTokens Prod
ServerSignature Off

EnableMMAP Off
EnableSendfile On
7 changes: 7 additions & 0 deletions phpldapadmin/apache2.conf.d/phpldapadmin.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DocumentRoot "/var/www/phpldapadmin"
<Directory "/var/www/phpldapadmin">
DirectoryIndex index.php
AllowOverride All
Options FollowSymlinks
Require all granted
</Directory>
6 changes: 6 additions & 0 deletions phpldapadmin/apache2.conf.d/remoteip.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<IfModule remoteip>
RemoteIPHeader X-Real-IP
RemoteIPInternalProxy 10.0.0.0/8
RemoteIPInternalProxy 172.16.0.0/12
RemoteIPInternalProxy 192.168.0.0/16
</IfModule>
4 changes: 4 additions & 0 deletions phpldapadmin/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
set -eu

exec "$@"
1 change: 1 addition & 0 deletions phpldapadmin/php.conf.d/90_apcu.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
apc.enable_cli=1
8 changes: 8 additions & 0 deletions phpldapadmin/php.conf.d/90_opcache.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
opcache.enable=1
opcache.interned_strings_buffer=32
opcache.max_accelerated_files=16229
opcache.memory_consumption=256
opcache.save_comments=1
opcache.revalidate_freq=60
opcache.jit=1255
opcache.jit_buffer_size=256M

0 comments on commit d59c801

Please sign in to comment.