Sign inSign up

kharismagp/phpmyadmin-alpine

By kharismagp

Updated over 1 year ago

Lightweight phpMyAdmin image with ARM64 v8 support, ideal for Apple Silicon.

Image
0

112

kharismagp/phpmyadmin-alpine repository overview

How to Use This Image

This setup allows you to run phpMyAdmin alongside a MariaDB server using Docker Compose. phpMyAdmin will be accessible at http://localhost:90, enabling seamless MySQL/MariaDB database management.

Credentials

phpMyAdmin connects to the MariaDB server using the credentials configured in the MariaDB container. The default environment variables used to define these credentials are:

  • MYSQL_ROOT_PASSWORD: (Required) The root user's password for the MariaDB server.
  • MYSQL_DATABASE: (Optional) The name of a database to be created at startup.
  • MYSQL_USER, MYSQL_PASSWORD: (Optional) Used to create a non-root user and set their password.
Example docker-compose.yml

Here is an example docker-compose.yml file for running phpMyAdmin with MariaDB:

version: '3.9'

services:
  mariadb:
    image: kharismagp/mariadb-alpine:amd64
    container_name: mariadb
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: db
      MYSQL_USER: user
      MYSQL_PASSWORD: password
    networks:
      - app-network
    ports:
      - "3307:3306"
    volumes:
      - mariadb-data:/var/lib/mysql

  phpmyadmin:
    image: kharismagp/phpmyadmin-alpine:amd64
    container_name: phpmyadmin
    restart: always
    depends_on:
      - mariadb
    ports:
      - "90:80"
    environment:
      PMA_HOST: mariadb
      MYSQL_ROOT_PASSWORD: root
    networks:
      - app-network

networks:
  app-network:
    driver: bridge

volumes:
  mariadb-data:
    driver: local
Explanation of Configuration
MariaDB Service
  • Image: kharismagp/mariadb-alpine:amd64 – A lightweight MariaDB server image.
  • Environment Variables:
    • MYSQL_ROOT_PASSWORD: The root password for the MariaDB instance.
    • MYSQL_DATABASE: Creates a database named db at startup (optional).
    • MYSQL_USER and MYSQL_PASSWORD: Creates a non-root user with the given credentials (optional).
  • Volumes: Maps persistent MariaDB data to mariadb-data.
phpMyAdmin Service
  • Image: kharismagp/phpmyadmin-alpine:amd64 – A lightweight phpMyAdmin image.
  • Environment Variables:
    • PMA_HOST: Specifies the hostname (mariadb) of the MariaDB server.
    • MYSQL_ROOT_PASSWORD: Connects phpMyAdmin to the MariaDB server using the root password.
Accessing phpMyAdmin

Once the services are running, you can access phpMyAdmin at http://localhost:90. Use the MariaDB credentials defined in the docker-compose.yml file to log in.

Supported Environment Variables
For phpMyAdmin
  • PMA_HOST: The hostname of the database server.
  • MYSQL_ROOT_PASSWORD: The root password for connecting to the database.
  • PMA_USER and PMA_PASSWORD: Credentials for a specific database user (optional).
  • PMA_HOSTS: A comma-separated list of database servers for multi-server environments.
For MariaDB
  • MYSQL_ROOT_PASSWORD: The root password (required).
  • MYSQL_DATABASE: A database to be created on startup (optional).
  • MYSQL_USER and MYSQL_PASSWORD: Credentials for creating a non-root user (optional).
Persistent Data

The mariadb-data volume ensures that data stored in the MariaDB container persists even after the container is stopped or removed.

Tag summary

Content type

Image

Digest

sha256:c95ac7d53

Size

57.3 MB

Last updated

over 1 year ago

docker pull kharismagp/phpmyadmin-alpine:arm64