You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ PHP is a server-side scripting language designed for web development, but which
41
41
**Images with `-extended` suffix at present only for php images with nginx. (Prometheus Exporter and other)*
42
42
**Images containing `apache` or `nginx` are integrated with the web server.*
43
43
**Images containing `debian` or `alpine` specify the operating system.*
44
-
**Images containing `dhi` based on [DHI (Docker Hardened Images)](https://dhi.io/catalog/php) and not based on offical images from community. This DHI do not have a shell and therefore NO entrypoint script. The environment variables listed in the README therefore do not work here. Mount your configuration file(s).*
44
+
**Images containing `dhi` based on [DHI (Docker Hardened Images)](https://dhi.io/catalog/php) and not based on offical images from community. This DHI do not have a shell and therefore NO entrypoint script. The environment variables listed in the README therefore do not work here. Mount your configuration file(s). A example docker-compose setup you can find [here](https://github.com/Tob1as/docker-php/tree/master/examples/fpm-nginx-dhi).*
45
45
* For easy install the extensions and get a smaller images it use [php-extension-installer](https://github.com/mlocati/docker-php-extension-installer).
46
46
* For information about PHP and extensions see here: [php.net](https://php.net) and [pecl.php.net](https://pecl.php.net).
Copy file name to clipboardExpand all lines: examples/fpm-nginx-dhi/README.md
+38-11Lines changed: 38 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,18 @@
4
4
5
5
This example docker-compose setup for [WSC (WoltLab Suite Core)](https://www.woltlab.com) contains 3 Docker Images:
6
6
***PHP** Image from this GitHub Repository.
7
-
It based on [PHP Image](https://dhi.io/catalog/php) from DHI (Docker Hardened Images) and includes extensions required for WSC.
7
+
It based on [PHP Image](https://dhi.io/catalog/php) from DHI (Docker Hardened Images) and includes extensions required for WSC.
8
+
This DHI image has no shell and entrypoint.
8
9
*[NGINX Image](https://dhi.io/catalog/nginx) from DHI
9
10
*[MySQL Image](https://dhi.io/catalog/mysql) from DHI
10
11
11
-
In this setup [Traefik](https://traefik.io/traefik) is use as Proxy, a example can find here [https://github.com/Tob1as/docker-kubernetes-collection](https://github.com/Tob1as/docker-kubernetes-collection/blob/master/examples_docker-compose/traefik_v3.yml).
12
+
13
+
Notes:
14
+
* In this setup [Traefik](https://traefik.io/traefik) is use as Proxy, a example can find here [https://github.com/Tob1as/docker-kubernetes-collection](https://github.com/Tob1as/docker-kubernetes-collection/blob/master/examples_docker-compose/traefik_v3.yml).
12
15
If you don't want to use it, make adjustments in the NGINX configuration file in "config" folder.
13
-
14
-
**Important: To pull Images from DHI you must login with your docker account.**
15
-
(Sourcecode from DH-Images can found here [https://github.com/docker-hardened-images](https://github.com/docker-hardened-images/catalog/tree/main/image).)
16
+
***Important: To pull Images from DHI you must login with your docker account.**
17
+
* (Sourcecode from DH-Images can found here [https://github.com/docker-hardened-images](https://github.com/docker-hardened-images/catalog/tree/main/image).)
18
+
* DHI images (mostly) have no shell and no entrypoint.
16
19
17
20
## Steps
18
21
1. Important: Login to dhi.io (`docker login dhi.io`) and optional to docker.io (`docker login`) on your server, if not already done.
@@ -24,13 +27,37 @@ If you don't want to use it, make adjustments in the NGINX configuration file in
24
27
4. create some subfolder:
25
28
*`mkdir ./html && chown 65532:65532 ./html`
26
29
*`mkdir ./data-db && chown 65532:65532 ./data-db`
27
-
5.[Download WSC](https://www.woltlab.com/en/woltlab-suite-download/) and unzip archive and copy all files from "upload" folder to "html" folder on your server.
28
-
6. Start the container setup with:
30
+
5. Start the container setup with:
29
31
`docker-compose up -d`
30
-
7. call your domain and file test.php, example: `http://example.com/test.php`
docker exec -it wsc-mysql bash -c 'mysql -uroot -e "CREATE USER \"${MYSQL_USER}\"@\"%\" IDENTIFIED BY \"${MYSQL_PASSWORD}\"; GRANT ALL PRIVILEGES ON ${MYSQL_DATABASE}.* TO \"${MYSQL_USER}\"@\"%\";"'
38
+
```
39
+
7.[Download WSC](https://www.woltlab.com/en/woltlab-suite-download/) and unzip archive and copy all files from "upload" folder in "html" folder on your server.
40
+
8. Call your domain and file test.php, example: `http://example.com/test.php`
If necessary, make further configurations for nginx or php in the files in the "config" folder.
47
+
48
+
> If you want to migrate from another PHP image, e.g. the official community image or other images in this repository, then adjust the folder and file permissions for the html folder:
49
+
`chown 65532:65532 ./html`
50
+
51
+
## PHP extensions
52
+
53
+
The base [PHP Image](https://dhi.io/catalog/php) of DHI includes the following PHP extensions by default:
54
+
`cgi-fcgi Core ctype curl date dom fileinfo filter hash iconv intl json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix random readline Reflection session SimpleXML sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter 'Zend OPcache' zlib`
55
+
(Check with: `docker run --rm dhi.io/php:<PHP_VERSION>-<OS>-fpm -m`)
56
+
57
+
The following extensions have been added (for WSC) to the image of this repository:
58
+
`gd pdo_mysql ldap gmp exif redis imagick`
59
+
(Check with: `docker run --rm docker.io/tobi312/php:<PHP_VERSION>-dhi-fpm-<OS>-wsc -m`)
35
60
36
-
If necessary, make further configurations for nginx or php in the files in the "config" folder.
61
+
You can check it with `-m` in docker run command or you can place a phpinfo.php file in the "html" folder and call in web browser:
0 commit comments