Home  >  Q&A  >  body text

apache - docker commit后无法启动服务

docker run -d -p 80:80 -p 3306:3306 -v /home/www:/app -v /home/mysql:/var/lib/mysql tutum/lamp
可以启动服务

docker run -i -t tutum/lamp /bin/bash
docker commit {id} test/lamp

docker run -d -p 80:80 -p 3306:3306 -v /home/www:/app -v /home/mysql:/var/lib/mysql free/lamp
无法启动服务

我的目标是修改tutum/lamp的配置, 可以修改好后commit之后无法启动web服务和mysql服务

阿神阿神2760 days ago579

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-22 08:57:50

    Already know the reason, the modified status is in the shell. And the shell does not start any services.
    The correct way is to use Dockerfile to build a new image

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-22 08:57:50

    There is something wrong with the configuration. Try changing it bit by bit to see which step is wrong.

    reply
    0
  • Cancelreply