— DevOps, Server, Docker — 1 min read
1docker restart <container-id>
Docker doesn’t start the nginx service itself
We need to start nginx server by:
1docker exec -it <container-id> service nginx restart
The we can check whether the nginx service is running or not by:
1ducky@titan-rtx:~$ docker exec -it <container-id> ps -ef|grep nginx2root 42 1 0 01:50 ? 00:00:00 nginx: master process /usr/sbin/3nginx 70 42 0 01:50 ? 00:00:00 nginx: worker process4nginx 71 42 0 01:50 ? 00:00:00 nginx: worker process5nginx 72 42 0 01:50 ? 00:00:00 nginx: worker process6nginx 73 42 0 01:50 ? 00:00:00 nginx: worker process
END