Will restarting docker restart apache in the container?

angryTom
Release: 2020-03-16 11:42:47
Original
3530 people have browsed it

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
Copy after login

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

Method one: Execute inside the container

service apache2 reload
Copy after login

Method two: Execute outside the container:

docker restart [container name]
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!