Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Corbin Uselton committed Aug 26, 2014
1 parent 6b439bd commit 5f3d017
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
Binary file modified .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN apt-get install -y mysql-client
RUN wget http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/4.2.7.1/phpMyAdmin-4.2.7.1-english.tar.bz2
RUN tar -xvjf /phpMyAdmin-4.2.7.1-english.tar.bz2 -C /
RUN rm /phpMyAdmin-4.2.7.1-english.tar.bz2
RUN rm -r /www
RUN mv /phpMyAdmin-4.2.7.1-english /www

ADD sources/config.inc.php /
Expand All @@ -25,4 +26,4 @@ RUN chmod +x /usr/local/bin/phpmyadmin-firstrun

EXPOSE 80

CMD [ phpmyadmin-start ]
CMD phpmyadmin-start
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docker run -d -e MYSQL_ROOT_PASSWORD=password --name mysql --expose 3306 -v /var/lib/mysql mysql:5.6.20
docker run -d --link mysql:mysql -e MYSQL_USERNAME=root --name phpmyadmin -p 80 corbinu/docker-phpmyadmin
2 changes: 1 addition & 1 deletion sources/create_user.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CREATE USER '$PMA_USERNAME'@'%' IDENTIFIED BY '$PMA_PASSWORD';
GRANT ALL PRIVILEGES ON 'phpmyadmin' . * TO '$PMA_USERNAME'@'%';
GRANT ALL PRIVILEGES ON phpmyadmin.* TO '$PMA_USERNAME'@'%';
FLUSH PRIVILEGES;
3 changes: 1 addition & 2 deletions sources/phpmyadmin-firstrun
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
sed -i.bak 's|$PMA_USERNAME|'"$PMA_USERNAME"'|g' /create_user.sql
sed -i.bak 's|$PMA_PASSWORD|'"$PMA_PASSWORD"'|g' /create_user.sql

mysql --host=$MYSQL_PORT_3306_TCP_ADDR --port=$MYSQL_PORT_3306_TCP_PORT --user=$MYSQL_USERNAME --password=$MYSQL_PASSWORD < /create_user.sql
mysql --host=$MYSQL_PORT_3306_TCP_ADDR --port=$MYSQL_PORT_3306_TCP_PORT --user=$MYSQL_USERNAME --password=$MYSQL_PASSWORD < /www/examples/create_tables.sql

mysql --host=$MYSQL_PORT_3306_TCP_ADDR --port=$MYSQL_PORT_3306_TCP_PORT --user=$MYSQL_USERNAME --password=$MYSQL_PASSWORD < /create_user.sql

rm /usr/local/bin/phpmyadmin-firstrun

0 comments on commit 5f3d017

Please sign in to comment.