Created
August 11, 2014 04:27
-
-
Save dalguete/cd2dc5471530b8df00da to your computer and use it in GitHub Desktop.
Here some files to reproduce the MySQL-Privileged problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo docker build -t mysql-test . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL | |
FROM ubuntu | |
RUN apt-get update | |
RUN echo "mysql-server-5.5 mysql-server/root_password password root123" | debconf-set-selections | |
RUN echo "mysql-server-5.5 mysql-server/root_password_again password root123" | debconf-set-selections | |
RUN echo "mysql-server-5.5 mysql-server/root_password seen true" | debconf-set-selections | |
RUN echo "mysql-server-5.5 mysql-server/root_password_again seen true" | debconf-set-selections | |
RUN apt-get install -y mysql-server mysql-client telnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################### | |
### Non Privileged ### | |
###################### | |
sudo docker run -it mysql-test bash | |
# Inside container | |
/etc/init.d/mysql start | |
telnet localhost 3306 # <-WORKS | |
################## | |
### Privileged ### | |
################## | |
sudo docker run --privileged -it mysql-test bash | |
# Inside container | |
/etc/init.d/mysql start | |
# A lot of '/usr/sbin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: Permission denied' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###################### | |
### Non Privileged ### | |
###################### | |
sudo docker run -it mysql-test bash | |
# Inside container | |
/usr/bin/mysqld_safe & | |
telnet localhost 3306 # <-WORKS | |
################## | |
### Privileged ### | |
################## | |
sudo docker run --privileged -it mysql-test bash | |
# Inside container | |
/usr/bin/mysqld_safe & | |
telnet localhost 3306 # <-DOES NOT WORK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment