Lightweight, Alpine based phpBB docker image.
3.3,3.3.4,latestbundled with PHP 83.2,3.2.11bundled with PHP 7.2
If you don't have a prepared phpBB database, you can use a standard phpBB
installer script, just run a temporary container with PHPBB_INSTALL=true
environment variable:
$ docker run -p 8000:80 --name phpbb-install -e PHPBB_INSTALL=true -d selim13/phpbb:3.3Point your browser to the http://localhost:8000 to begin the installation process.
This image is bundled with SQLite3, MySQL and PostgresSQL database engines support. Others can be added by creating custom Dockerfile. For MySQL and PostgresSQL you can use standard container linking or use SQLite if you want a self sufficient container.
For SQLite3 set Database server hostname or DSN field to /phpbb/sqlite/sqlite.db.
This file will be created on a docker volume and outside of the webserver's document root
for security. Leave user name, password and database name fields blank.
After the installation process is complete you can safely stop this container:
$ docker stop phpbb-installYou can start a container as follows:
$ docker run --name phpbb -d selim13/phpbb:3.3By default, it uses SQLite3 as a database backend, so you will need to supply
it with a database file. It's default path is /phpbb/sqlite/sqlite.db.
You can import it from the temporary installation container above:
$ docker run --volumes-from phpbb-install --name phpbb -d selim13/phpbb:3.3Or just copy it inside container if you have one from previous phpBB installations:
$ docker cp /path/at/host/sqlite.db phpbb:/www/sqlite/sqlite.dbFor other database engines you will need to pass credentials and driver type using environment variables:
$ docker run --name phpbb \
-e PHPBB_DB_DRIVER=mysqli \
-e PHPBB_DB_HOST=dbmysql \
-e PHPBB_DB_PORT=3306 \
-e PHPBB_DB_NAME=phpbb \
-e PHPBB_DB_USER=phpbb \
-e PHPBB_DB_PASSWD=pass -d selim13/phpbb:3.3This image utilises environment variables for basic configuration. Most of
them are passed directly to phpBB's config.php or to the startup script.
If set to true, container will start with an empty config.php file and
phpBB /install/ directory intact. This will allow you to initilalize
a forum database upon fresh installation.
Selects a database driver. phpBB3 ships with following drivers:
mssql- MS SQL Servermysql- MySQL via outdated php extensionmysqli- MySQL via newer php extensionoracle- Oraclepostgres- PostgreSQLsqlite- SQLite 2sqlite3- SQLite 3
This image is bundled with support of sqlite3, mysqli and postgres drivers.
Default value: sqlite3
Database hostname or ip address.
For the SQLite3 driver sets database file path.
Default value: /phpbb/sqlite/sqlite.db
Database port.
Supplies database name for phpBB3.
Supplies a user name for phpBB3 database.
Supplies a user password for phpBB3 database.
If you feel paranoid about providing your database password in an environment
variable, you can always ship it with a custom config.php file using volumes
or by extending this image.
Table prefix for phpBB3 database.
Default value: phpbb_
If set to true, instructs a container to run database migrations by
executing bin/phpbbcli.php db:migrate on every startup.
If migrations fail, container will refuse to start.
If set to true, container will wait for database service to become available.
You will need to explicitly set PHPBB_DB_HOST and PHPBB_DB_PORT for this
to work.
Use in conjunction with PHPBB_DB_AUTOMIGRATE to prevent running migrations
before database is ready.
Won't work for SQLite database engine as it is always available.
If set to true, phpBB will display page loading time, queries count and peak memory
usage at the bottom of the page.
If set to true, enables phpBB debug mode.
By default there are four volumes created for each container:
- /phpbb/sqlite
- /phpbb/www/files
- /phpbb/www/store
- /phpbb/www/images/avatars/upload
This image is based on a stock official Alpine image with apache2 and php5
packages from the Alpine Linux repository, so you can drop their custom
configuration files to /etc/apache2/conf.d and /etc/php5/conf.d.
If you are planning to start a container behind proxy (like nginx-proxy), it will probably be a good idea to get user's real IP instead of proxy one. For this, you can use Apache RemoteIP module. Create a configuration file:
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-Real-IP
RemoteIPInternalProxy nginx-proxyHere X-Real-IP is a header name, where proxy passed user's real IP and
nginx-proxy is proxy host name.
Then push it to /etc/apache2/conf.d/ directory, for example, by extending this
image:
FROM selim13/phpbb:3.3
COPY remoteip.conf /etc/apache2/conf.d