Errori di installazione di MYSQL con docker

Sto provando ad installare mysql da un contenitore docker su rhel6. Questo è il mio file dockerfile:

#HELLO FROM rhel6 MAINTAINER xxxx ADD ./perl /usr/bin/ RUN whereis perl RUN ls -lrt /usr/bin/ RUN yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm -y RUN yum update RUN yum install mysql ADD ./startup.sh /opt/startup.sh EXPOSE 3306 CMD ["/bin/bash", "/opt/startup.sh"] 

Questo è il mio script di avvio:

 if [ ! -f /var/lib/mysql/ibdata1 ]; then mysql_install_db /usr/bin/mysqld_safe & sleep 10s echo "GRANT ALL ON *.* TO [email protected]'%' IDENTIFIED BY 'changeme' WITH GRANT OPTION; FLUSH PRIVILEGES" | mysql killall mysqld sleep 10s fi /usr/bin/mysqld_safe 

Quando eseguo il mio contenitore docker, questo è l'errore che sto ottenendo:

 [xxxx ~/mysql]$ sudo docker run -i -t -p 3306:3306 mysql12 /bin/bash bash-4.1# service mysqld start mysqld: unreceachzed service bash-4.1# ls bin boot dev etc home lib lib64 lost+found media mnt mysql-community-release-el6-5.noarch.rpm opt proc root run sbin selinux srv sys tmp usr var 

Questa è l'output che vedo quando eseguo docker eseguire -i -t

 [xxxx/mysql]$ sudo docker run -i -t 3e7ed89e7d4a /opt/startup.sh: line 3: mysql_install_db: command not found /opt/startup.sh: line 5: /usr/bin/mysqld_safe: No such file or directory /opt/startup.sh: line 8: mysql: command not found mysqld: no process killed /opt/startup.sh: line 14: /usr/bin/mysqld_safe: No such file or directory 

Non ho molta esperienza nell'installazione del software. Sto mancando qualcosa ai miei passi? Questo ha precedentemente lavorato su centos. Credo che con la procedura che ho seguito mysqld non sta installando. Gli esperti possono suggerirmi suggerimenti?

ERRORE PIU 'RECENTE:

 ---> Package mysql-community-client.x86_64 0:5.6.22-2.el6 will be installed --> Processing Dependency: perl(Sys::Hostname) for package: mysql-community-client-5.6.22-2.el6.x86_64 --> Processing Dependency: perl(IPC::Open3) for package: mysql-community-client-5.6.22-2.el6.x86_64 --> Processing Dependency: perl(Getopt::Long) for package: mysql-community-client-5.6.22-2.el6.x86_64 --> Processing Dependency: perl(File::Temp) for package: mysql-community-client-5.6.22-2.el6.x86_64 --> Processing Dependency: perl(Fcntl) for package: mysql-community-client-5.6.22-2.el6.x86_64 --> Processing Dependency: perl(Exporter) for package: mysql-community-client-5.6.22-2.el6.x86_64 --> Processing Dependency: /usr/bin/perl for package: mysql-community-client-5.6.22-2.el6.x86_64 ---> Package mysql-community-common.x86_64 0:5.6.22-2.el6 will be installed --> Processing Dependency: /usr/bin/perl for package: mysql-community-client-5.6.22-2.el6.x86_64 --> Finished Dependency Resolution Error: Package: mysql-community-client-5.6.22-2.el6.x86_64 (mysql56-community) Requires: perl(Sys::Hostname) Error: Package: mysql-community-client-5.6.22-2.el6.x86_64 (mysql56-community) Requires: /usr/bin/perl Error: Package: mysql-community-client-5.6.22-2.el6.x86_64 (mysql56-community) Requires: perl(Getopt::Long) Error: Package: mysql-community-client-5.6.22-2.el6.x86_64 (mysql56-community) Requires: perl(IPC::Open3) Error: Package: mysql-community-client-5.6.22-2.el6.x86_64 (mysql56-community) Requires: perl(Exporter) Error: Package: mysql-community-client-5.6.22-2.el6.x86_64 (mysql56-community) Requires: perl(File::Temp) Error: Package: mysql-community-client-5.6.22-2.el6.x86_64 (mysql56-community) Requires: perl(Fcntl) You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodesgest 2015/01/16 10:23:43 The command [/bin/sh -c yum install mysql] returned a non-zero code: 1 

Suppongo che installi mysql-community-release-el6-5.noarch.rpm che vedo è disponibile all'indirizzo http://dev.mysql.com/downloads/repo/yum/ .

Questo è solo un pacchetto per installare i repository in contrasto con il mysql effettivo. dovresti fare

 yum install http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm -y yum update yum install mysql 

dopo l'installazione di quel pacchetto o scaricare il rpm da http://dev.mysql.com/downloads/mysql/ :