How to restart apache2 without terminating docker container?

后端 未结 5 994
甜味超标
甜味超标 2021-02-02 10:29

I am using as a base the php docker container with the tag:

php:5.6-apache

When I try to restart the apache2 inside the container, the containe

5条回答
  •  情歌与酒
    2021-02-02 11:06

    I want to customize the container, I need to install some extension and for them to work I need to restart apache for the changes to take effect.

    This is against the Docker's immutable infrastructure principle. IMHO, you are using the docker container similar to a full blown VM. Instead, I would suggest you to treat the docker image as the final artifact and version it. Note: This is just my humble opinion, you may have a valid usecase which I am not aware of, which I am curious to find out.

提交回复
热议问题