A database GUI is the thing you want for ten minutes a day. Installing pgAdmin or MySQL Workbench is a heavy ask for that. Adminer is a single PHP file that does most of what those do — browse tables, run queries, edit rows, dump and restore — and the Docker image is one line, no setup.
How do I run Adminer in Docker?
docker run -d --name adminer -p 8080:8080 adminerOpen http://localhost:8080. The login page asks for the database engine (MySQL, PostgreSQL, MariaDB, MongoDB, etc.), host, user, password, and database name. Fill in your container's connection details and you're in.
Configure container name and port.
Why Adminer over phpMyAdmin or Workbench
- Single PHP file (1 MB) versus phpMyAdmin's many files and many MB.
- Multi-database — MySQL, MariaDB, PostgreSQL, MongoDB, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch (read-only), ClickHouse. phpMyAdmin is MySQL/MariaDB only.
- No install, no upgrade hassle — just pull the latest Adminer image when you want updates.
- Fast — page loads are sub-second; the UI is HTML-first.
The trade-off versus full-featured GUIs (DBeaver, TablePlus, pgAdmin): less polish, fewer query-builder UIs, no native cross-database connection management. For day-to-day "browse, query, edit a row, dump a table," Adminer is plenty.
Connect Adminer to a database container
The classic Compose pattern:
services:
db:
image: postgres:17
environment:
POSTGRES_PASSWORD: change-me
volumes:
- db-data:/var/lib/postgresql/data
adminer:
image: adminer
ports:
- "::host_port:8080"
depends_on:
- db
volumes:
db-data:Open http://localhost:8080. In the Adminer login form:
- System: PostgreSQL
- Server:
db(the Compose service name) - Username:
postgres - Password:
change-me - Database: leave empty to see all, or
postgres
For MySQL:
- System: MySQL
- Server:
mysql(or whatever you named the MySQL service) - Username:
root - Password: the value of
MYSQL_ROOT_PASSWORD
For MongoDB:
- System: MongoDB
- Server:
mongo - Username: the value of
MONGO_INITDB_ROOT_USERNAME - Password: the value of
MONGO_INITDB_ROOT_PASSWORD
The Adminer container talks to the database container via Compose service-name DNS — no port publishing needed on the database itself.
Default to one database (skip the login form's "System" picker)
If you only ever use Adminer for one engine, set the default:
services:
adminer:
image: adminer
ports:
- "8080:8080"
environment:
ADMINER_DEFAULT_SERVER: db
ADMINER_DEFAULT_DRIVER: pgsql # or 'server' for MySQLThe login form arrives pre-filled — just type your password.
Practical usage: dump and restore a single table
The Adminer Export button on any table writes SQL or a CSV to your downloads. The Import button reads it back. Fast, no command-line gymnastics. For full database dumps the mysqldump / pg_dump route is more efficient; for "I need to copy this one table to my local DB," Adminer is the easiest path.
Common pitfalls
- Adminer can't reach
127.0.0.1. Inside the Adminer container,127.0.0.1is the Adminer container's loopback, not the database. Use the database container's service name (db,mysql, etc.) on the same Docker network. - MySQL 8
caching_sha2_passworderrors from Adminer. Adminer ships with a PHP MySQL driver that may not support the modern auth plugin. Either upgrade Adminer (newer images bundle a newer driver), or switch the MySQL user tomysql_native_password. - Port 8080 already in use. Adminer listens on 8080 inside the container; publish to a different host port if 8080 is taken (
-p 8081:8080). - Adminer exposed to the network. The container has no built-in auth gating beyond the per-DB login. Don't publish it on a non-loopback interface unless the host is private.
What to do next
- Run MySQL in Docker, PostgreSQL, MariaDB, MongoDB — the per-database recipes Adminer pairs with.
- Docker Compose: Getting Started — the Compose mechanism that lets Adminer reach databases by service name.
FAQ
Sources
Authoritative references this article was fact-checked against.
- Official Adminer image — Docker Hubhub.docker.com
- Adminer project siteadminer.org

