Hi everybody,
I want to make my own mysql container from mysql image. But mysql container can not run.
My Dockerfile;
FROM mysql
ENV MYSQL_ROOT_PASSWORD=pass
RUN mkdir /usr/sql
RUN chmod 644 /usr/sql
ADD Tedam_Master.sql /usr/sql/
ADD restoredb.sh /usr/sql/
ADD entrypoint.sh /usr/sql
RUN chmod +x /usr/sql/restoredb.sh
RUN chmod +x /usr/sql/entrypoint.sh
EXPOSE 3306
WORKDIR /usr/sql/
ENTRYPOINT entrypoint.sh
entypoint.sh;
/ usr/sql/restoredb.sh && /etc/init.d/mysql start
restoredb.sh;
sleep 10s
echo “Starting database import!”
mysql -u root -p$MYSQL_ROOT_PASSWORD -e “CREATE DATABASE mydb”
mysql -u root -p$MYSQL_ROOT_PASSWORD -D mydb< /usr/sql/Tedam_Master.sql
Who can help me?