Home  >  Article  >  Operation and Maintenance  >  Will restarting docker restart apache in the container?

Will restarting docker restart apache in the container?

angryTom
angryTomOriginal
2020-03-16 11:42:473510browse

Will restarting docker restart apache in the container?

Will restarting docker restart apache in the container?

Restarting docker will not restart apache in the container, nor will it restart Container, if the container startup method uses the --restart=always parameter, this mode will cause the apache service in the container to automatically resume after docker exits and restarts.

Note: If docker enters the container through exec, you need to restart the server after modifying the Apache configuration. If you use the following command in the container, it will cause the container to exit:

service apache2 restart

Use the following two methods Apache configuration information can be updated without exiting the container:

Method one: Execute inside the container

service apache2 reload

Method two: Execute outside the container:

docker restart [container name]

For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.

The above is the detailed content of Will restarting docker restart apache in the container?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn