ubuntu 12.04 into docker “service mysql start”

后端 未结 1 875
慢半拍i
慢半拍i 2020-12-19 18:33

I need ubuntu 12.04 with developing web-services running (sshd, apache2.2, php5.3, mysql-server). I have ubuntu 14.04, i installed docker.

Then i started container:

相关标签:
1条回答
  • 2020-12-19 19:03

    There is no init process running inside the container. Therefore the runelevel can't be determined. If there is an unknown runlevel, upstart can not start mysql. ... see /etc/init/mysql.conf

    ...
    start on runlevel [2345]
    ...
    

    If you try to check the runlevel:

    $ runlevel
    unknown
    

    ... you see it is unknown.

    In Docker it is the common way to start the application in foreground.

    /usr/bin/mysqld_safe
    

    If you want to start more than one application, you can use supervisord.

    http://supervisord.org/

    https://docs.docker.com/articles/using_supervisord/

    Additional i've found a Dockerfile, which starts a init inside a ubuntu:12.04 docker container. Really nice work:

    https://github.com/tianon/dockerfiles/blob/master/sbin-init/ubuntu/upstart/12.04/Dockerfile

    0 讨论(0)
提交回复
热议问题