mysql_install_db in Docker container returns error

I created Dockerfile with follow content:

FROM ubuntu:latest

RUN apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y nano curl apache2 mysql-server-5.6 php5-mysql php5 libapache2-mod-php5 php5-mcrypt php5-intl php5-gd php5-imagick php5-curl 


I build it and run container. When I try to run mysql_install_db in container, I get error:

  • docker cassandra with opscenter unable connected
  • Docker / Celery: Can't get celery to run
  • What is the difference between running docker image in and outside of vagrant?
  • Run Jupyter Notebook in the Background on Docker
  • Error starting Docker Quickstart
  • How to use Liberty Docker
  • FATAL ERROR: Could not find my-default.cnf

    When I run mysql by command service mysql start, I get message:

    * Starting MySQL database server mysqld. No directory, logging in with HOME=/ [OK]                                                                                                                                                                       
    * Checking for tables which need an upgrade, are corrupt or were not closed cleanly.

    If I use MySQL 5.5, it works fine without any errors, as usual.

    What do I do wrong?

  • `docker service update` from remote server with cert
  • Customize docker-java response to remove some logger like stream
  • How to configure NGINX routes?
  • Azure ARM Template dependsOn: How to reference a VM extension?
  • Cron is unable to run my command, even though it works for me (inside docker container)
  • How to rebuild dockerfile quick by using cache?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.