選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

37 行
898B

  1. #
  2. # MariaDB Dockerfile
  3. #
  4. # https://github.com/bingen/rpi-mariadb
  5. #
  6. # Pull base image.
  7. FROM resin/raspberrypi3-debian:latest
  8. ENV DEBIAN_FRONTEND=noninteractive
  9. # Install MariaDB.
  10. RUN \
  11. apt-get update && \
  12. apt-get upgrade && \
  13. apt-get -y install mariadb-server
  14. RUN \
  15. sed -i 's/^\(bind-address\s.*\)/# \1/' /etc/mysql/my.cnf && \
  16. echo "mysqld_safe &" > /tmp/config && \
  17. echo "mysqladmin --silent --wait=30 ping || exit 1" >> /tmp/config && \
  18. echo "mysql -e 'GRANT ALL PRIVILEGES ON *.* TO \"root\"@\"%\" WITH GRANT OPTION;'" >> /tmp/config && \
  19. bash /tmp/config && \
  20. mysql -e "SELECT Host, User, Password FROM mysql.user;" > /tmp/a.out
  21. #rm -f /tmp/config
  22. COPY startup.sh /usr/local/bin/
  23. RUN chmod +x /usr/local/bin/startup.sh
  24. # Define mountable directories.
  25. #VOLUME ["/var/lib/mysql"]
  26. # Define default command.
  27. CMD ["/usr/local/bin/startup.sh"]
  28. # Expose ports.
  29. EXPOSE 3306