What is Adminer?
Adminer is a tool for managing databases. It is similar to other popular database management tools like phpMyAdmin and SQL Management Studio, but it is designed to be lightweight and easy to use. Adminer is written in PHP and can be used to manage a variety of database systems, including MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, and Elasticsearch. It allows you to perform common database management tasks such as creating, editing, and deleting databases and tables, running SQL queries, and managing user accounts.
For This Service didn’t require any configuration just, you should install adminer and its dependencies, then I started the PHP interpreter and start an internal web server the server on all available network interfaces and will listen to port 8081.
# base image
FROM debian:buster
# instal php and php-mysql and wget to download adminer
RUN apt update -y && apt install -y php php-mysql && apt install -y wget && wget "<http://www.adminer.org/latest.php>" -O /var/www/html/index.php
#start an intrenal web server, the server on all available network interfaces and will listen to port 8081, the webserver root directory is /var/www/html/
CMD ["php", "-S", "0.0.0.0:8081", "-t", "/var/www/html"]
Then you can run the http://localhost:80 and the page of the adminer on the screen.
Then You create and set your database information, you can then log in.
You can modify and track your database's modification through the site.
in the docker-compose.yml file, I expose the 8081 port (default port for Adminer) and connected in the nat
network.