{"id":16540679,"url":"https://github.com/osixia/docker-phpmyadmin","last_synced_at":"2025-10-28T14:31:41.649Z","repository":{"id":18721303,"uuid":"21932376","full_name":"osixia/docker-phpMyAdmin","owner":"osixia","description":"A docker image to run phpMyAdmin 🐳","archived":false,"fork":false,"pushed_at":"2020-12-13T00:51:17.000Z","size":155,"stargazers_count":12,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"stable","last_synced_at":"2025-02-01T15:23:24.956Z","etag":null,"topics":["docker","docker-image","phpmyadmin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osixia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-17T07:18:08.000Z","updated_at":"2024-06-28T10:26:58.000Z","dependencies_parsed_at":"2022-09-03T08:13:20.569Z","dependency_job_id":null,"html_url":"https://github.com/osixia/docker-phpMyAdmin","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpMyAdmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpMyAdmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpMyAdmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osixia%2Fdocker-phpMyAdmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osixia","download_url":"https://codeload.github.com/osixia/docker-phpMyAdmin/tar.gz/refs/heads/stable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238663134,"owners_count":19509738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","phpmyadmin"],"created_at":"2024-10-11T18:53:02.906Z","updated_at":"2025-10-28T14:31:36.357Z","avatar_url":"https://github.com/osixia.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osixia/phpmyadmin\n\n[![Docker Pulls](https://img.shields.io/docker/pulls/osixia/phpmyadmin.svg)][hub]\n[![Docker Stars](https://img.shields.io/docker/stars/osixia/phpmyadmin.svg)][hub]\n[![](https://images.microbadger.com/badges/image/osixia/phpmyadmin.svg)](http://microbadger.com/images/osixia/phpmyadmin \"Get your own image badge on microbadger.com\")\n\n[hub]: https://hub.docker.com/r/osixia/phpmyadmin/\n\nLatest release: 5.0.2 - phpMyAdmin 5.0.2 - [Changelog](CHANGELOG.md) | [Docker Hub](https://hub.docker.com/r/osixia/phpmyadmin/) \n\n**A docker image to run phpMyAdmin.**\n\u003e [phpmyadmin.net](https://www.phpmyadmin.net)\n\n- [osixia/phpmyadmin](#osixiaphpmyadmin)\n\t- [Quick start](#quick-start)\n\t\t- [MariaDB \u0026 phpMyAdmin in 1'](#mariadb--phpmyadmin-in-1)\n\t- [Beginner Guide](#beginner-guide)\n\t\t- [Use your own phpMyAdmin config](#use-your-own-phpmyadmin-config)\n\t\t- [HTTPS](#https)\n\t\t\t- [Use autogenerated certificate](#use-autogenerated-certificate)\n\t\t\t- [Use your own certificate](#use-your-own-certificate)\n\t\t\t- [Disable HTTPS](#disable-https)\n\t\t- [Fix docker mounted file problems](#fix-docker-mounted-file-problems)\n\t\t- [Debug](#debug)\n\t- [Environment Variables](#environment-variables)\n\t\t- [Set your own environment variables](#set-your-own-environment-variables)\n\t\t\t- [Use command line argument](#use-command-line-argument)\n\t\t\t- [Link environment file](#link-environment-file)\n\t\t\t- [Make your own image or extend this image](#make-your-own-image-or-extend-this-image)\n\t- [Advanced User Guide](#advanced-user-guide)\n\t\t- [Extend osixia/phpmyadmin:5.0.2 image](#extend-osixiaphpmyadmin502-image)\n\t\t- [Make your own phpMyAdmin image](#make-your-own-phpmyadmin-image)\n\t\t- [Tests](#tests)\n\t\t- [Kubernetes](#kubernetes)\n\t\t- [Under the hood: osixia/web-baseimage](#under-the-hood-osixiaweb-baseimage)\n\t- [Security](#security)\n\t- [Changelog](#changelog)\n\n## Quick start\n\nRun a phpMyAdmin docker image by replacing `db.example.com` with your mysql host or IP :\n\n    docker run -p 6443:443 \\\n           --env PHPMYADMIN_DB_HOSTS=db.example.com \\\n           --detach osixia/phpmyadmin:5.0.2\n\nThat's it :) you can access phpMyAdmin on [https://localhost:6443](https://localhost:6443)\n\n### MariaDB \u0026 phpMyAdmin in 1'\n\nExample script:\n\n\t\t#!/bin/bash -e\n\t\tdocker run --name bdd-service --hostname bdd-service --env MARIADB_ROOT_ALLOWED_NETWORKS=\"#PYTHON2BASH:['172.17.%.%', 'localhost', '127.0.0.1', '::1']\" --detach osixia/mariadb:0.2.9\n\n\t\tdocker run --name phpmyadmin-service --hostname phpmyadmin-service --link bdd-service:bdd-host --env PHPMYADMIN_DB_HOSTS=bdd-host --detach osixia/phpmyadmin:5.0.2\n\n\t\tPHPMY_IP=$(docker inspect -f \"{{ .NetworkSettings.IPAddress }}\" phpmyadmin-service)\n\n\t\techo \"Go to: https://$PHPMY_IP\"\n\t\techo \"Login: admin\"\n\t\techo \"Password: admin\"\n\n## Beginner Guide\n\n### Use your own phpMyAdmin config\nThis image comes with a phpMyAdmin config.inc.php file that can be easily customized via environment variables for a quick bootstrap, but setting your own config.inc.php is possible. 2 options:\n\n- Link your config file at run time to `/container/service/phpmyadmin/assets/config/config.inc.php` :\n\n      docker run --volume /data/my-config.inc.php:/container/service/phpmyadmin/assets/config/config.inc.php --detach osixia/phpmyadmin:5.0.2\n\n- Add your config file by extending or cloning this image, please refer to the [Advanced User Guide](#advanced-user-guide)\n\n### HTTPS\n\n#### Use autogenerated certificate\nBy default HTTPS is enable, a certificate is created with the container hostname (it can be set by docker run --hostname option eg: phpmyadmin.my-company.com).\n\n\tdocker run --hostname phpmyadmin.my-company.com --detach osixia/phpmyadmin:5.0.2\n\n#### Use your own certificate\n\nYou can set your custom certificate at run time, by mounting a directory containing those files to **/container/service/phpmyadmin/assets/apache2/certs** and adjust their name with the following environment variables:\n\n\tdocker run --volume /path/to/certifates:/container/service/phpmyadmin/assets/apache2/certs \\\n\t--env PHPMYADMIN_HTTPS_CRT_FILENAME=my-cert.crt \\\n\t--env PHPMYADMIN_HTTPS_KEY_FILENAME=my-cert.key \\\n\t--env PHPMYADMIN_HTTPS_CA_CRT_FILENAME=the-ca.crt \\\n\t--detach osixia/phpmyadmin:5.0.2\n\nOther solutions are available please refer to the [Advanced User Guide](#advanced-user-guide)\n\n#### Disable HTTPS\nAdd --env PHPMYADMIN_HTTPS=false to the run command :\n\n    docker run --env PHPMYADMIN_HTTPS=false --detach osixia/phpmyadmin:5.0.2\n\n### Fix docker mounted file problems\n\nYou may have some problems with mounted files on some systems. The startup script try to make some file adjustment and fix files owner and permissions, this can result in multiple errors. See [Docker documentation](https://docs.docker.com/v1.4/userguide/dockervolumes/#mount-a-host-file-as-a-data-volume).\n\nTo fix that run the container with `--copy-service` argument :\n\n\t\tdocker run [your options] osixia/phpmyadmin:5.0.2 --copy-service\n\n### Debug\n\nThe container default log level is **info**.\nAvailable levels are: `none`, `error`, `warning`, `info`, `debug` and `trace`.\n\nExample command to run the container in `debug` mode:\n\n\tdocker run --detach osixia/phpmyadmin:5.0.2 --loglevel debug\n\nSee all command line options:\n\n\tdocker run osixia/phpmyadmin:5.0.2 --help\n\n## Environment Variables\n\nEnvironment variables defaults are set in **image/environment/default.yaml**\n\nSee how to [set your own environment variables](#set-your-own-environment-variables)\n\n- **PHPMYADMIN_CONFIG_ABSOLUTE_URI**: Sets here the complete URL (with full path) to your phpMyAdmin installation’s directory. E.g. http://www.example.net/path_to_your_phpMyAdmin_directory/. Note also that the URL on most of web servers are case–sensitive. Don’t forget the trailing slash at the end. it is advisable to try leaving this blank. In most cases phpMyAdmin automatically detects the proper setting. Defaults to `empty`.\n\n- **PHPMYADMIN_DB_HOSTS**: Set phpMyAdmin server config. Defaults to :\n\n  ```yaml\n  - db1.example.org:\n    - port: 3306\n    - connect_type: tcp\n    - auth_type: cookie\n    - ssl: true\n    - ssl_ca: /container/service/mariadb-client/assets/certs/ca.crt\n    - ssl_cert: /container/service/mariadb-client/assets/certs/cert.crt\n    - ssl_key: /container/service/mariadb-client/assets/certs/cert.key\n  - db2.example.org\n  - db3.example.org\n  ```\n  This will be converted in the phpmyadmin config.inc.php file to :\n  ```php7\n\t$cfg['Servers'][1]['host'] = 'db1.example.org';\n\t$cfg['Servers'][1]['port']='3306';\n\t$cfg['Servers'][1]['connect_type']='tcp';\n\t$cfg['Servers'][1]['auth_type']='cookie';\n\t$cfg['Servers'][1]['ssl']=true;\n\t$cfg['Servers'][1]['ssl_ca']='/container/service/mariadb-client/assets/certs/ca.crt';\n\t$cfg['Servers'][1]['ssl_cert']='/container/service/mariadb-client/assets/certs/cert.crt';\n\t$cfg['Servers'][1]['ssl_key']='/container/service/mariadb-client/assets/certs/cert.key';\n\t$cfg['Servers'][2]['host'] = 'db2.example.org';\n\t$cfg['Servers'][3]['host'] = 'db3.example.org';\n  ```\n  All server configuration are available, just add the needed entries, for example:  \n  ```yaml\n\t- db1.example.org:\n    - port: 3306\n    - connect_type: tcp\n    - auth_type: cookie\n\t\t- compress: false\n\t\t- user: dbuser\n\t\t- nopassword: true\n  - db2.example.org\n  - db3.example.org\n  ```\n\n  See complete list: http://docs.phpmyadmin.net/fr/latest/config.html, $cfg['Servers'][$i] configs.\n\n  If you want to set this variable at docker run command add the tag `#PYTHON2BASH:` and convert the yaml in python:\n\n\t\tdocker run --env PHPMYADMIN_DB_HOSTS=\"#PYTHON2BASH:[{'db1.example.org': [{'port': 3306},{'connect_type': 'tcp'},{'auth_type': 'cookie'},{'ssl': True},{'ssl_ca': '/container/service/mariadb-client/assets/certs/ca.crt'},{'ssl_cert': '/container/service/mariadb-client/assets/certs/cert.crt'},{'ssl_key': '/container/service/mariadb-client/assets/certs/cert.key'}]},'db2.example.org','db3.example.org']\" --detach osixia/phpmyadmin:5.0.2\n\n  To convert yaml to python online: http://yaml-online-parser.appspot.com/\n\n- **PHPMYADMIN_CONFIG_DB_HOST**: Set $cfg['Servers'][$i]['controlhost']. Defaults to `empty`.\n- **PHPMYADMIN_CONFIG_DB_PORT**: Set $cfg['Servers'][$i]['controlport']. Defaults to `empty`.\n- **PHPMYADMIN_CONFIG_DB_NAME**: Set $cfg['Servers'][$i]['pmadb']. Defaults to `empty`.\n- **PHPMYADMIN_CONFIG_DB_USER**:  Set $cfg['Servers'][$i]['controluser']. Defaults to `empty`.\n- **PHPMYADMIN_CONFIG_DB_PASSWORD**:  Set $cfg['Servers'][$i]['controlpass']. Defaults to `empty`.\n\n- **PHPMYADMIN_CONFIG_DB_TABLES**: phpMyadmin config database tables names added to each server config. Defaults to:\n  ```yaml\n\t- bookmarktable: pma__bookmark\n  - relation: pma__relation\n  - table_info: pma__table_info\n  - table_coords: pma__table_coords\n  - pdf_pages: pma__pdf_pages\n  - column_info: pma__column_info\n  - history: pma__history\n  - table_uiprefs: pma__table_uiprefs\n  - tracking: pma__tracking\n  - userconfig: pma__userconfig\n  - recent: pma__recent\n  - favorite: pma__favorite\n  - users: pma__users\n  - usergroups: pma__usergroups\n  - navigationhiding: pma__navigationhiding\n  - savedsearches: pma__savedsearches\n  - central_columns: pma__central_columns\n\t```\n\nApache :\n- **PHPMYADMIN_SERVER_ADMIN**: Server admin email. Defaults to `webmaster@example.org`\n- **PHPMYADMIN_SERVER_PATH**: Server path (usefull if behind a reverse proxy). Defaults to `/phpmyadmin`\n\nHTTPS :\n- **PHPMYADMIN_HTTPS**: Use apache ssl config. Defaults to `true`\n- **PHPMYADMIN_HTTPS_CRT_FILENAME**: Apache ssl certificate filename. Defaults to `phpmyadmin.crt`\n- **PHPMYADMIN_HTTPS_KEY_FILENAME**: Apache ssl certificate private key filename. Defaults to `phpmyadmin.key`\n- **PHPMYADMIN_HTTPS_CA_CRT_FILENAME**: Apache ssl CA certificate filename. Defaults to `ca.crt`\n\nReverse proxy HTTPS :\n- **PHPMYADMIN_TRUST_PROXY_SSL**: Set to `true` to trust X-Forwarded-Proto header\n\nOther environment variables:\n- **PHPMYADMIN_SSL_HELPER_PREFIX**: ssl-helper environment variables prefix. Defaults to `phpmyadmin`, ssl-helper first search config from PHPMYADMIN_SSL_HELPER_* variables, before SSL_HELPER_* variables.\n- **MARIADB_CLIENT_SSL_HELPER_PREFIX**: ssl-helper environment variables prefix. Defaults to `database`, ssl-helper first search config from DATABASE_SSL_HELPER_* variables, before SSL_HELPER_* variables.\n\n### Set your own environment variables\n\n#### Use command line argument\nEnvironment variables can be set by adding the --env argument in the command line, for example:\n\n\tdocker run --env PHPMYADMIN_DB_HOSTS=\"db.example.org\" \\\n\t--detach osixia/phpmyadmin:5.0.2\n\n#### Link environment file\n\nFor example if your environment file is in :  /data/environment/my-env.yaml\n\n\tdocker run --volume /data/environment/my-env.yaml:/container/environment/01-custom/env.yaml \\\n\t--detach osixia/phpmyadmin:5.0.2\n\nTake care to link your environment file to `/container/environment/XX-somedir` (with XX \u003c 99 so they will be processed before default environment files) and not  directly to `/container/environment` because this directory contains predefined baseimage environment files to fix container environment (INITRD, LANG, LANGUAGE and LC_CTYPE).\n\n#### Make your own image or extend this image\n\nThis is the best solution if you have a private registry. Please refer to the [Advanced User Guide](#advanced-user-guide) just below.\n\n## Advanced User Guide\n\n### Extend osixia/phpmyadmin:5.0.2 image\n\nIf you need to add your custom TLS certificate, bootstrap config or environment files the easiest way is to extends this image.\n\nDockerfile example:\n\n    FROM osixia/phpmyadmin:5.0.2\n    MAINTAINER Your Name \u003cyour@name.com\u003e\n\n    ADD https-certs /container/service/phpmyadmin/assets/apache2/certs\n    ADD database-certs /container/service/mariadb-client/assets/certs\n    ADD my-config.inc.php /container/service/phpmyadmin/assets/config/config.inc.php\n    ADD environment /container/environment/01-custom\n\n\n### Make your own phpMyAdmin image\n\nClone this project :\n\n\tgit clone https://github.com/osixia/docker-phpMyAdmin\n\tcd docker-phpMyAdmin\n\nAdapt Makefile, set your image NAME and VERSION, for example :\n\n\tNAME = osixia/phpmyadmin\n\tVERSION = 4.7.2\n\n\tbecomes :\n\tNAME = billy-the-king/phpmyadmin\n\tVERSION = 0.1.0\n\nAdd your custom certificate, environment files, config.inc.php ...\n\nBuild your image :\n\n\tmake build\n\nRun your image :\n\n\tdocker run -d billy-the-king/phpmyadmin:0.1.0\n\n### Tests\n\nWe use **Bats** (Bash Automated Testing System) to test this image:\n\n\u003e [https://github.com/sstephenson/bats](https://github.com/sstephenson/bats)\n\nInstall Bats, and in this project directory run :\n\n\tmake test\n\n### Kubernetes\n\nKubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.\n\nMore information:\n- http://kubernetes.io\n- https://github.com/kubernetes/kubernetes\n\nA kubernetes example is available in **example/kubernetes**\n\n### Under the hood: osixia/web-baseimage\n\nThis image is based on osixia/web-baseimage.\nMore info: https://github.com/osixia/docker-web-baseimage\n\n## Security\nIf you discover a security vulnerability within this docker image, please send an email to the Osixia! team at security@osixia.net. For minor vulnerabilities feel free to add an issue here on github.\n\nPlease include as many details as possible.\n\n## Changelog\n\nPlease refer to: [CHANGELOG.md](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosixia%2Fdocker-phpmyadmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosixia%2Fdocker-phpmyadmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosixia%2Fdocker-phpmyadmin/lists"}