Adminer is a full-featured database management tool in a single PHP file. Supports MySQL, SQLite and PostgreSQL.
adminer.org
appjail makejail \
    -j adminer \
    -f gh+AppJail-makejails/adminer \
    -o virtualnet=":<random> default" \
    -o nat \
    -o expose=80appjail-director upappjail-director.yml:
options:
  - virtualnet: ':<random> default'
  - nat:
services:
  adminer:
    makejail: gh+AppJail-makejails/adminer
    name: adminer
    options:
      - expose: '8080:80'
  db:
    makejail: gh+AppJail-makejails/mariadb
    name: mariadb
    arguments:
      - mariadb_user: adminer
      - mariadb_password: 123
      - mariadb_database: adminer
      - mariadb_root_password: 321Remember that the root user cannot be used remotely by default in the MariaDB makejail. See MariaDB arguments for details.
This image bundles all official Adminer plugins. You can find the list of plugins on GitHub: https://github.com/vrana/adminer/tree/main/plugins.
To load plugins you can pass a list of filenames in adminer_plugins:
appjail makejail \
    -j adminer \
    -f gh+AppJail-makejails/adminer \
    -o virtualnet=":<random> default" \
    -o nat \
    -o fstab="$PWD/plugins.php usr/local/www/apache24/data/plugins.php nullfs ro" -- \
        --adminer_plugins "login-password-less"As you can see above, plugins.php is mounted inside the jail, so you can easily edit it from the host without logging in. Our plugins.php should look like this:
plugins.php:
<?php
// See https://www.adminer.org/en/plugins/
$plugins = array(
    new AdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE", PASSWORD_DEFAULT)),
);There are some custom stages that we can use to easily maintain our plugins.
List plugins:
# appjail run -s list_plugins adminer
[00:00:01] [ debug ] [adminer] Running initscript `/usr/local/appjail/jails/adminer/init` ...
frames
login-otp
dump-json
dump-bz2
enum-types
dump-xml
...
List installed plugins:
# appjail run -s list_installed_plugins adminer
[00:00:01] [ debug ] [adminer] Running initscript `/usr/local/appjail/jails/adminer/init` ...
login-password-less
[00:00:02] [ debug ] [adminer] custom:list_installed_plugins() exits with status code 0
[00:00:02] [ debug ] [adminer] `/usr/local/appjail/jails/adminer/init` exits with status code 0
Note: Although the plugin.php plugin is actually installed, it is not listed here and cannot be removed using the following custom stage.
Remove a plugin:
# appjail run -s remove_plugin -p plugin=login-password-less adminer
[00:00:01] [ debug ] [adminer] Running initscript `/usr/local/appjail/jails/adminer/init` ...
[00:00:01] [ debug ] [adminer] custom:remove_plugin() exits with status code 0
[00:00:01] [ debug ] [adminer] `/usr/local/appjail/jails/adminer/init` exits with status code 0
# appjail run -s remove_plugin -p plugin=login-password-less adminer
[00:00:01] [ debug ] [adminer] Running initscript `/usr/local/appjail/jails/adminer/init` ...
###> 'login-password-less' This plugin is not installed. <###
[00:00:01] [ debug ] [adminer] custom:remove_plugin() exits with status code 1
[00:00:01] [ debug ] [adminer] `/usr/local/appjail/jails/adminer/init` exits with status code 1
As you can see above, the command should complain only when the plugin is not installed.
Add a plugin:
appjail run -s add_plugin -p plugin=login-password-less adminer
The image bundles all the designs that are available in the source package of Adminer. You can find the list of designs on GitHub: https://github.com/adminer/adminer/tree/main/designs.
To use a bundled design you can pass its name in adminer_design:
appjail makejail \
    -j adminer \
    -f gh+AppJail-makejails/adminer \
    -o virtualnet=":<random> default" \
    -o nat -- \
        --adminer_design "pepa-linha"There are some custom stages that we can use to easily maintain our design.
List designs:
# appjail run -s list_designs adminer
[00:00:02] [ debug ] [adminer] Running initscript `/usr/local/appjail/jails/adminer/init` ...
brade
pilot
mancave
pepa-linha-dark
pokorny
jukin
...
Change the current design:
appjail run -s change_design -p design=nicu adminerRemove the current design:
appjail run -s remove_design adminerThis Makejail uses the PHP file from adminer.org/plugins/#use, but in chunks for ease of use.
# tree
.
├── adminer.php
├── customization.php
├── drivers.php
├── index.php
├── plugins
│   ├── drivers
│   │   └── index.php
│   ├── index.php
│   └── plugin.php
└── plugins.php
3 directories, 8 files
- customization.php: Combine customization and plugins.
- drivers.php: Enable extra drivers just by including them.
- plugins.php: Specify enabled plugins here after you add them in- plugins/.
You can also easily put your adminer.css alongside adminer.php.
- adminer_tag(default:- 13.5-apache): See #tags.
- adminer_ajspec(default:- gh+AppJail-makejails/adminer): Entry point where the- appjail-ajspec(5)file is located.
- adminer_plugins(optional): A space-separated list of plugins to be added.
- adminer_design(optional): Design to be used.
- adminer_php_type(default:- production) The PHP configuration file to link to- /usr/local/etc/php.ini. Valid values:- development,- production. Only valid for apache, use the- php_typeargument when using php-fpm.
- adminer_upload_limit(default:- 128M): This option will change upload_max_filesize and post_max_size values. Format:- [0-9]+[KMG].
- adminer_memory_limit(default:- 1G): This option will override the memory limit for PHP (memory_limit). Format:- [0-9]+[KMG].
- adminer_max_execution_time(default:- 600): This option will override the maximum execution time in seconds for PHP (max_execution_time).
- adminer_session_save_path(default:- /sessions): See session.save_path.
- adminer_tz(default:- UTC): Change date.timezone.
| Name | Owner | Group | Perm | Type | Mountpoint | 
|---|---|---|---|---|---|
| adminer-plugins-file | - | - | - | - | usr/local/www/apache24/data/plugins.php | 
| adminer-plugins | - | - | - | - | /usr/local/www/apache24/data/plugins | 
| adminer-drivers | - | - | - | - | /usr/local/www/apache24/data/plugins/drivers | 
| Name | Owner | Group | Perm | Type | Mountpoint | 
|---|---|---|---|---|---|
| adminer-plugins-file | - | - | - | - | usr/local/www/adminer/plugins.php | 
| adminer-plugins | - | - | - | - | /usr/local/www/adminer/plugins | 
| adminer-drivers | - | - | - | - | /usr/local/www/adminer/plugins/drivers | 
| Tag | Arch | Version | Type | adminer_version | 
|---|---|---|---|---|
| 13.5-apache | amd64 | 13.5-RELEASE | thin | 5.3.0 | 
| 13.5-fpm | amd64 | 13.5-RELEASE | thin | 5.3.0 | 
| 14.3-apache | amd64 | 14.3-RELEASE | thin | 5.3.0 | 
| 14.3-fpm | amd64 | 14.3-RELEASE | thin | 5.3.0 | 
- Only mysqli,pgsql,sqlite3andpdo_dblibare included in the images.
