phpMyAdmin running in Alpine linux with Nginx and PHP-FPM
9.1K
phpMyAdmin running in Alpine linux with Nginx and PHP-FPM.
docker run --name phpmyadmin -d -p 8080:8080 moonbuggy2000/phpmyadmin:latest
The default builds use the all-languages release. To save a few megabytes the English-only version is also available, tagged with the suffix english.
Environmental variables can be specified with the -e flag. Available environmental variables are:
PMA_ARBITRARY - when set to true connection to an arbitrary server will be allowedPMA_HOST - define address/host name of the MySQL serverPMA_VERBOSE - define verbose name of the MySQL serverPMA_PORT - define port of the MySQL serverPMA_HOSTS - define comma separated list of address/host names of the MySQL serversPMA_VERBOSES - define comma separated list of verbose names of the MySQL serversPMA_PORTS - define comma separated list of ports of the MySQL serversPMA_USER - define username for MySQL server authenticationPMA_PASSWORD - define password for MySQL server authenticationPMA_ABSOLUTE_URI - define user-facing URIPMA_SSL - set true enable SSL (default: false)PMA_SSL_KEY - path to client key file (default: /certs/client-key.pem)PMA_SSL_CERT - path to client certificate file (default: /certs/client-cert.pem)PMA_SSL_CA - path to CA file (default: /certs/server-ca.pem)PMA_SSL_CA_PATH - path to directory of trusted CA certificates (default: /certs/ca/)PMA_SSL_CIPHERS - list of allowable ciphers (default: NULL)PMA_SSL_VERIFY - enable SSL validation (default: true)PMA_CONSOLE_DARKTHEME - dark theme for the console window (default: false)NGINX_PORT - phpMyAdmin web interface port (default: 8080)PUID - user ID to run asPGID - group ID to run asTZ - timezoneThis image should run basically the same way the official phpMyAdmin image does and a more detailed description is available on their GitHub or DockerHub pages.
If you wish to configure phpMyAdmin through the config file rather than environment variables you can mount and edit /etc/phpmyadmin/config.inc.php.
To persist SSL keys/certificates /certs should be mounted.
This example assumes you have Traefik v2 running in another container, ready to proxy. If you don't just remove the references to the traefik network.
version: '2'
services:
mariadb:
image: jbergstroem/mariadb-alpine:latest
container_name: mariadb
restart: unless-stopped
ports:
- 3306:3306
volumes:
- mariadb_data:/var/lib/mysql
environment:
- "MYSQL_DATABASE=phpmyadmin"
- "MYSQL_USER=user"
- "MYSQL_PASSWORD=password"
- "MYSQL_ROOT_PASSWORD=rootpassword"
networks:
- mariadb
- traefik
phpmyadmin:
image: moonbuggy2000/phpmyadmin:latest-english
container_name: phpmyadmin
depends_on:
- mariadb
restart: unless-stopped
ports:
- 8080:8080
volumes:
- phpmyadmin_certs:/certs
environment:
- "PMA_ABSOLUTE_URI=phpmyadmin.local"
- "PMA_HOST=mariadb"
- "PMA_PORT=3306"
- "PMA_USER=user"
- "PMA_PASSWORD=password"
- "TZ=Australia/Sydney"
labels:
- "traefik.enable=true"
- "traefik.http.routers.phpmyadmin.rule=Host(`phpmyadmin.local`)"
- "traefik.http.services.phpmyadmin.loadbalancer.server.port=8080"
networks:
- mariadb
- traefik
volumes:
mariadb_data:
driver: local
name: mariadb_data
phpmyadmin_certs:
driver: local
name: phpmyadmin_certs
networks:
mariadb:
driver: bridge
name: mariadb
traefik:
external:
name: traefik
GitHub: https://github.com/moonbuggy/docker-phpmyadmin
Docker Hub: https://hub.docker.com/r/moonbuggy2000/phpmyadmin
Content type
Image
Digest
sha256:02d8abd56…
Size
44 MB
Last updated
almost 2 years ago
docker pull moonbuggy2000/phpmyadmin