![Docker pulls](https://img.shields.io/docker/pulls/nazarpc/phpmyadmin.svg?label=Docker pulls) ![Docker stars](https://img.shields.io/docker/stars/nazarpc/phpmyadmin.svg?label=Docker stars)
This container may be used with MySQL or MariaDB linked containers.
If you like this image - you may also like set of images for WebServer.
#How to use With MySQL:
docker run --name mysql -e MYSQL_ROOT_PASSWORD=my_password -d mysql
docker run --rm --link mysql:mysql -p 1234:80 nazarpc/phpmyadmin
With MariaDB:
docker run --name mariadb -e MYSQL_ROOT_PASSWORD=my_password -d mariadb
docker run --rm --link mariadb:mysql -p 1234:80 nazarpc/phpmyadmin
(internally it should be called mysql
anyway)
After these commands you'll be able to access phpMyAdmin via http://localhost:1234
, press Ctrl+C
to stop container, and it will be removed automatically (because of --rm
option). Feel free to change 1234
to any port you like.
Sometimes it is necessary to upload big dump which doesn't fit into default limit 128M. You can specify alternative size via environment variable UPLOAD_SIZE
:
docker run --rm --link mysql:mysql -p 1234:80 -e UPLOAD_SIZE=1G nazarpc/phpmyadmin
The default session timeout is just 1440 seconds (24 minutes). You can specify an alternative timeout by setting the environment variable SESSION_TIMEOUT
:
docker run --rm --link mysql:mysql -p 1234:80 -e SESSION_TIMEOUT=86400 nazarpc/phpmyadmin
By default phpMyAdmin assumes MySQL is available through mysql
hostname. Sometimes this is not the case, so you can override this with environmental variable MYSQL_HOST
:
docker run --rm --link mysql:mysql -p 1234:80 -e MYSQL_HOST=mariadb:9999 nazarpc/phpmyadmin
Examples of valid MYSQL_HOST
:
mariadb
- hostnamemariadb
mariadb:9999
- hostnamemariadb
with port9999
mariadb;root
- hostnamemariadb
with userroot
mariadb;root;123
- hostnamemariadb
with userroot
& password123
mariadb:9999;root;123
- hostnamemariadb
with userroot
, password123
& port9999
mysql, mariadb:9999, mariadb:9999;root;123
- multiple servers
docker run --rm --link mysql:mysql -p 1234:80 -e ALLOW_ARBITRARY=1 nazarpc/phpmyadmin
Sometimes phpMyAdmin may determine its own URI incorrectly. Usually you can fix it by correcting virtual host of revers proxy, but sometimes it might be useful to specify URI explicitly:
docker run --rm --link mysql:mysql -p 1234:80 -e ABSOLUTE_URI=https://domain.tld/phpmyadmin nazarpc/phpmyadmin
You can specify any PMA-config-setting using a JSON object passed to JSON_CONFIG
, that will be merged to the existing config.
docker run --rm --link mysql:mysql -p 1234:80 -e JSON_CONFIG='{"AllowUserDropDatabase": true,"MaxTableList": 450, "NavigationTreeTableSeparator": "_"}' nazarpc/phpmyadmin
This image doesn't use any custom base, just official PHP 5.6 container with built-in Apache2 web server. There is support for importing SQL dumps in all compression formats supported by phpMyAdmin. There is possibility to connect to multiple servers of your choice or even to arbitrary servers if necessary.
Also this image generates blowfish_secret
configuration option (unique for each container instance, you don't have to rebuild it yourself) on each container start, so that you will automatically use cookie sessions (for your convenience).
Plus, I'll try to keep it up to date with new releases of phpMyAdmin (as well as PHP itself and other software inside image), so, by using nazarpc/phpmyadmin
image you'll always have latest versions.
#Questions? Open an issue and ask your question there:)
#License Public Domain