Merge pull request #2 from CybotTM/compose+arbitrary

add support for arbitrary servers and compose configuration file
This commit is contained in:
Michal Čihař
2015-12-04 13:15:12 +01:00
6 changed files with 52 additions and 4 deletions
+5 -4
View File
@@ -5,10 +5,11 @@ RUN wget --progress=dot https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-a
&& rm phpMyAdmin*.tar.gz \
&& mv phpMyAdmin* /www
COPY config.inc.php /www/config.inc.php
COPY config.inc.arbitrary.php /www/config.inc.arbitrary.php
COPY config.inc.linked.php /www/config.inc.linked.php
COPY run.sh /run.sh
RUN chmod u+rwx /run.sh
EXPOSE 8080
ENTRYPOINT ["php", "-S", "0.0.0.0:8080", "-t", "/www/"]
CMD []
ENTRYPOINT [ "/run.sh" ]
+21
View File
@@ -16,3 +16,24 @@ docker run --name myadmin -d --link mysql_db_server:db -p 8080:8080 phpmyadmin/p
Then open browser, visit http://***.***.host.ip:8080
You will see the phpmyadmin login page
## Usage with arbitrary server
You can use arbitrary servers by adding ENV variable PMA_ARBITRARY=1 to the startup command:
```
docker run --name myadmin -d --link mysql_db_server:db -p 8080:8080 -e PMA_ARBITRARY=1 phpmyadmin/phpmyadmin
```
## Usage with docker-compose and arbitrary server
This will run phpMyAdmin with arbitrary server - allowing you to specify MySQL/MariaDB
server on login page.
Using the docker-compose.yml from https://github.com/phpmyadmin/docker
```
docker-compose up -d
```
than as usual, open http://localhost:8080 and enjoy your happy MySQL administration.
+6
View File
@@ -0,0 +1,6 @@
<?php
$cfg['blowfish_secret'] = 'xkjdkfj2x83kx';
$cfg['AllowArbitraryServer'] = true;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
+8
View File
@@ -0,0 +1,8 @@
phpmyadmin:
image: phpmyadmin:testing
container_name: myadmin
environment:
- PMA_ARBITRARY=1
restart: always
ports:
- 8080:8080
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
set -x
# use arbitrary server
if [ "$PMA_ARBITRARY" ]
then
cp /www/config.inc.arbitrary.php /www/config.inc.php
else
cp /www/config.inc.linked.php /www/config.inc.php
fi
php -S 0.0.0.0:8080 -t /www/