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

Will restarting docker restart apache in the container?

Mar 16, 2020 am 11:42 AM
apache docker Restart

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!

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

Hot Article

Hot Article

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

How to install deepseek

Agile development and operation of PHP microservice containerization Agile development and operation of PHP microservice containerization May 08, 2024 pm 02:21 PM

Agile development and operation of PHP microservice containerization

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node?

PHP distributed system architecture and practice PHP distributed system architecture and practice May 04, 2024 am 10:33 AM

PHP distributed system architecture and practice

How to use PHP CI/CD to iterate quickly? How to use PHP CI/CD to iterate quickly? May 08, 2024 pm 10:15 PM

How to use PHP CI/CD to iterate quickly?

Deploy JavaEE applications using Docker Containers Deploy JavaEE applications using Docker Containers Jun 05, 2024 pm 08:29 PM

Deploy JavaEE applications using Docker Containers

How to add a server in eclipse How to add a server in eclipse May 05, 2024 pm 07:27 PM

How to add a server in eclipse

How to conduct concurrency testing and debugging in Java concurrent programming? How to conduct concurrency testing and debugging in Java concurrent programming? May 09, 2024 am 09:33 AM

How to conduct concurrency testing and debugging in Java concurrent programming?

See all articles