How does docker A Container restart the nginx Service of Container B

scenario requirements

A Container runs a nginx control service for reading and writing nginx configuration files
B Container runs a nginx service based on

built by alpine.

question

now the question arises: how does Container A restart the nginx service of Container B?

I use volumes to connect the key files of the two containers. Container A needs to restart container B"s nginx service after changing the nginx configuration file, but this nginx reload command cannot be communicated to container B. I"ve thought of several solutions before.

scenario 1: integrate the two services
but after checking for a long time, it is found that alpine does not have a locale and the program cannot be run.

scenario 2: send instructions
I don"t know what to do


docker B enables the ssh service, docker A to log in to docker B via ssh, and then you can execute commands on docker B.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4ba69-43dc6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4ba69-43dc6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?