From 1a06458dd2512b5bcda0a849738bb5ca32bf8ec0 Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 16 Jan 2020 23:19:52 +0100 Subject: [PATCH 1/2] Add phpMyAdmin --- phpmyadmin/README-short.txt | 1 + phpmyadmin/content.md | 133 ++++++++++++++++++++++++++++++++++++ phpmyadmin/github-repo | 1 + phpmyadmin/license.md | 1 + phpmyadmin/logo.png | Bin 0 -> 4601 bytes phpmyadmin/maintainer.md | 1 + phpmyadmin/stack.yml | 15 ++++ 7 files changed, 152 insertions(+) create mode 100644 phpmyadmin/README-short.txt create mode 100644 phpmyadmin/content.md create mode 100644 phpmyadmin/github-repo create mode 100644 phpmyadmin/license.md create mode 100644 phpmyadmin/logo.png create mode 100644 phpmyadmin/maintainer.md create mode 100644 phpmyadmin/stack.yml diff --git a/phpmyadmin/README-short.txt b/phpmyadmin/README-short.txt new file mode 100644 index 000000000..23c2afd65 --- /dev/null +++ b/phpmyadmin/README-short.txt @@ -0,0 +1 @@ +phpMyAdmin - A web interface for MySQL and MariaDB. diff --git a/phpmyadmin/content.md b/phpmyadmin/content.md new file mode 100644 index 000000000..49f190bae --- /dev/null +++ b/phpmyadmin/content.md @@ -0,0 +1,133 @@ +# What is phpMyAdmin? + +phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement. + +Run phpMyAdmin with Alpine, Apache and PHP FPM. + +%%LOGO%% + +# How to use this image + +All following examples will bring you phpMyAdmin on `http://localhost:8080` where you can enjoy your happy MySQL administration. + +## Credentials + +phpMyAdmin does use MySQL server credential, please check the corresponding server image for information how it is setup. + +The official MySQL and MariaDB use following environment variables to define these: + +- `MYSQL_ROOT_PASSWORD` - This variable is mandatory and specifies the password that will be set for the `root` superuser account. +- `MYSQL_USER`, `MYSQL_PASSWORD` - These variables are optional, used in conjunction to create a new user and to set that user's password. + +## Supported Docker hub tags + +The following tags are available: + +- `latest`, `fpm`, and `fpm-alpine` are always the most recent released version +- Major versions, such as `5`, `5-fpm`, and `5-fpm-alpine` +- Specific minor versions, such as `5.0`, `5.0-fpm`, and `5-fpm-alpine` +- Specific patch versions, such as `5.0.0`, `5.0.0-fpm`, and `5.0.0-alpine`. Note that, on rare occasion, here may be an intermediary "docker-only" release, such as 4.9.2-1 +- `edge`, `edge-fpm`, `edge-fpm-alpine`, a development version build from the daily snapshot + +## Image variants + +We provide three variations: + +### apache + +"apache" includes a full Apache webserver with PHP and includes everything needed to work out of the box. + +This is the default when only a version number is requested. + +### fpm + +"fpm" only starts a PHP FPM container. Use this variant if you already have a seperate webserver. + +This includes more tools and is therefore a larger image than the "fpm-alpine" variation. + +### fpm-alpine + +"fpm-alpine" has a very small footprint. It is based on Alpine Linux and only starts a PHP FPM process. + +Use this variant if you already have a seperate webserver. If you need more tools that are not available on Alpine Linux, use the fpm image instead. + +## Usage with linked server + +First you need to run MySQL or MariaDB server in Docker, and this image need link a running mysql instance container: + +```console +$ docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 %%IMAGE%% +``` + +## Usage with external server + +You can specify MySQL host in the `PMA_HOST` environment variable. You can also use `PMA_PORT` to specify port of the server in case it's not the default one: + +```console +$ docker run --name myadmin -d -e PMA_HOST=dbhost -p 8080:80 %%IMAGE%% +``` + +## Usage with arbitrary server + +You can use arbitrary servers by adding ENV variable `PMA_ARBITRARY=1` to the startup command: + +```console +$ docker run --name myadmin -d -e PMA_ARBITRARY=1 -p 8080:80 %%IMAGE%% +``` + +## Usage with docker-compose and arbitrary server + +This will run phpMyAdmin with arbitrary server - allowing you to specify MySQL/MariaDB server on login page. + +%%STACK%% + +## Adding Custom Configuration + +You can add your own custom config.inc.php settings (such as Configuration Storage setup) by creating a file named "config.user.inc.php" with the various user defined settings in it, and then linking it into the container using `-v /some/local/directory/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php`. + +On the `docker run` line like this: + +```console +$ docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -v /some/local/directory/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php %%IMAGE%% +``` + +See the following links for config file information: + +- https://docs.phpmyadmin.net/en/latest/config.html#config +- https://docs.phpmyadmin.net/en/latest/setup.html + +## Usage behind reverse proxys + +Set the variable `PMA_ABSOLUTE_URI` to the fully-qualified path (`https://pma.example.net/`) where the reverse proxy makes phpMyAdmin available. + +## Environment variables summary + +- `PMA_ARBITRARY` - when set to 1 connection to the arbitrary server will be allowed +- `PMA_HOST` - define address/host name of the MySQL server +- `PMA_VERBOSE` - define verbose name of the MySQL server +- `PMA_PORT` - define port of the MySQL server +- `PMA_HOSTS` - define comma separated list of address/host names of the MySQL servers +- `PMA_VERBOSES` - define comma separated list of verbose names of the MySQL servers +- `PMA_PORTS` - define comma separated list of ports of the MySQL servers +- `PMA_USER` and `PMA_PASSWORD` - define username to use for config authentication method +- `PMA_ABSOLUTE_URI` - define user-facing URI +- `HIDE_PHP_VERSION` - if defined, will hide the php version (`expose_php = Off`). Set to any value (such as HIDE_PHP_VERSION=true). +- `UPLOAD_LIMIT` - if set, will override the default value for apache and php-fpm (default value is 2048 kb) +- `PMA_CONFIG_BASE64` - if set, will override the default config.inc.php with the base64 decoded contents of the variable +- `PMA_USER_CONFIG_BASE64` - if set, will override the default config.user.inc.php with the base64 decoded contents of the variable + +For usage with Docker secrets, appending `_FILE` to the `PMA_PASSWORD` environment variable is allowed (it overrides `PMA_PASSWORD` if it is set): + +```console +$ docker run --name myadmin -d -e PMA_PASSWORD_FILE=/run/secrets/db_password.txt -p 8080:80 phpmyadmin/phpmyadmin +``` + +#### Variables that can be read from a file using `_FILE` + +- PMA_PASSWORD +- MYSQL_ROOT_PASSWORD +- MYSQL_PASSWORD +- PMA_HOSTS +- PMA_HOST + +For more detailed documentation see https://docs.phpmyadmin.net/en/latest/setup.html#installing-using-docker diff --git a/phpmyadmin/github-repo b/phpmyadmin/github-repo new file mode 100644 index 000000000..e39059d5b --- /dev/null +++ b/phpmyadmin/github-repo @@ -0,0 +1 @@ +https://github.com/phpmyadmin/docker diff --git a/phpmyadmin/license.md b/phpmyadmin/license.md new file mode 100644 index 000000000..844da91bc --- /dev/null +++ b/phpmyadmin/license.md @@ -0,0 +1 @@ +View [license information](https://github.com/phpmyadmin/docker/blob/master/LICENSE) for the software contained in this image. diff --git a/phpmyadmin/logo.png b/phpmyadmin/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..95c656e45718302a7f0606eccaee22d24e86daf5 GIT binary patch literal 4601 zcmYjU1yq#X^Inz)DM<+l=?+N|aRro=5|;8Kq?c4+L6j6}L}}QiyB1iG?(QyWK~kg^ z5Q*O_{Quwi?z!*0&&+-1nVGw1_nZyU)ObolL{9_)fk>2}DQE-lBH*zkzy|C(!D$@u z!m)m={ul%*iy}TZ!v%b-*V<1ZpprqxO%Motp{b^;sAlWZ-`_tlFyH_$9UUD7FtAQj zNCA6wRX;d5cpc~;A0Gz*K)Z2oY;SMxO}wwK55U0s@99|z*?-*|%^Uk~91#4kCV)FT zJO6unl}^^%(*;ESr2zm2M*$T9sejdg=5MmDB0%=n7-;4u1z`RwcmsequufA*02fd= zM*i({p#LuonD^xW+lF210M^B&xqJS zp@Bjt*Y|mvLI&sqWB}YGUJI63c@zu{4cU2?0j{0POlUyM{rwFoB1S!zl zQ4;Yff*b&cskGNqkh*%80W;cr{!Ib)8G`&K_olLy{$4DwcXPx6!r#$=W|D#GB-e2=AjKYz+Rql+Emqzv z(VlKW9wTWFGdPaYS&uTpS&ewi8Nu}AzlmAg> zGS*o!U*o%0YW%&-Y@#i1q^EAZME6(D{hLn&C^ylXvtDYjT5dVe*NaKLbAqHC>S^36 zQu~!FwOOnM+`wT5=WN5L#p<^sU0*TjtovDlW1Zz|Wu{Xt$icqOoq{Jn^W^60KF-(p zO*JKrw-*fcwk=n=Z5Jp`wq~tVI*qj#Pd6pxm?x$J--_8c+8R0_lPEE~z=(n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?l;5UtqDD7OBPn?Ovxy%f^knG7xjV-EIiH*q4@(9~ zco=bG_RPlbJX9l0_0#tWr>Bz2geAUU-Or6qItsKK{YW#`59pkdKWY67R}xy)QQaD%e+P2VG4E)TWXUW_@M+d zige-f&0)^ms!1x9%NRyoK3u|S*RQoDnP4xE-NiKl%~fJM;3O>frw;V4x#O_a!IjK5 zPqZJVd|6DGjT8M~D6+_u=Y`Skt5Mj(&PH3VIXF_OPERmI&I11ksPMfCn^wf5*1Lp=&N_m;brjV zFqOb_3hF~X?ZHyD;*`{2__#S<_!8eNBajf8edw3-Q-^||{|I|~a?y)8IFff8(sCv# zjDS8jX+3kZ*aiDc)-b#nu*#{7Rfe^5>P~d$>?Pw)V{S&U4YkEOE zbJpa@4gOXzKDzo2MvEgM{1z^?qPQ_`RAzBSv5Lzx(bIc@=UTY~ z8O-m85MEpFyfHHx1ln+AT=!D+KbWFrm6oEWF9LrKCu!3gJqTsDg^f=rew1yP`w>-m zesB$;??p+XXK(W;1r$3ZD?C^Sy{)7rH`*WQMl_JwtZUNP3R1X3?5fF*t+R<6($Ghn znG8@yu`KkFxZOpVs;X)i%Em=#+-uid$XCJ(4j*=~WH;Wdh=aqOuUt>N1vkK1&)>@| z@AsxwnnQ~J>3vk@_Pye6k?*rqe`0a?M!Lql}|r)oUm&1nbYl?ot>mUNZf0cw>VsVIb)3A32WFe{w6R zxe5jUdNFmVzOow`8HqVQoQsT{(D&(FByE(W?PWzJk$)M?3md{wgla8%XP;-WIQm$k z?a!U^-WHe4VXnFw+w&sE=(jzBEYn*wIq%@%uQ$hCfpd5WvuhxmM!^3!kg}qNLJ7pw F|9^}TPAvcc literal 0 HcmV?d00001 diff --git a/phpmyadmin/maintainer.md b/phpmyadmin/maintainer.md new file mode 100644 index 000000000..b487e3510 --- /dev/null +++ b/phpmyadmin/maintainer.md @@ -0,0 +1 @@ +[phpMyAdmin](%%GITHUB-REPO%%) diff --git a/phpmyadmin/stack.yml b/phpmyadmin/stack.yml new file mode 100644 index 000000000..edf2636cc --- /dev/null +++ b/phpmyadmin/stack.yml @@ -0,0 +1,15 @@ +version: '3.1' + +services: + db: + image: mariadb:10.3 + restart: always + environment: + MYSQL_ROOT_PASSWORD: notSecureChangeMe + + phpmyadmin: + image: phpmyadmin + ports: + - 8080:80 + environment: + - PMA_ARBITRARY=1 From 301c98c7060d8fc31d011680763fac403d776fe2 Mon Sep 17 00:00:00 2001 From: J0WI Date: Thu, 7 May 2020 15:46:19 +0200 Subject: [PATCH 2/2] Remove redundant section --- phpmyadmin/content.md | 23 ----------------------- phpmyadmin/stack.yml | 1 + 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/phpmyadmin/content.md b/phpmyadmin/content.md index 49f190bae..a179df3dc 100644 --- a/phpmyadmin/content.md +++ b/phpmyadmin/content.md @@ -27,29 +27,6 @@ The following tags are available: - Major versions, such as `5`, `5-fpm`, and `5-fpm-alpine` - Specific minor versions, such as `5.0`, `5.0-fpm`, and `5-fpm-alpine` - Specific patch versions, such as `5.0.0`, `5.0.0-fpm`, and `5.0.0-alpine`. Note that, on rare occasion, here may be an intermediary "docker-only" release, such as 4.9.2-1 -- `edge`, `edge-fpm`, `edge-fpm-alpine`, a development version build from the daily snapshot - -## Image variants - -We provide three variations: - -### apache - -"apache" includes a full Apache webserver with PHP and includes everything needed to work out of the box. - -This is the default when only a version number is requested. - -### fpm - -"fpm" only starts a PHP FPM container. Use this variant if you already have a seperate webserver. - -This includes more tools and is therefore a larger image than the "fpm-alpine" variation. - -### fpm-alpine - -"fpm-alpine" has a very small footprint. It is based on Alpine Linux and only starts a PHP FPM process. - -Use this variant if you already have a seperate webserver. If you need more tools that are not available on Alpine Linux, use the fpm image instead. ## Usage with linked server diff --git a/phpmyadmin/stack.yml b/phpmyadmin/stack.yml index edf2636cc..c95606814 100644 --- a/phpmyadmin/stack.yml +++ b/phpmyadmin/stack.yml @@ -9,6 +9,7 @@ services: phpmyadmin: image: phpmyadmin + restart: always ports: - 8080:80 environment: