How to Dockerizing LEMP Stack with Docker-Compose
LEMP: Linux, Nginx, PHP, MySQL Nginx Create docker-compose.yml in a directory(lemp) is as follows: version: '3.8' services: nginx: image: nginx:1.20.2 ports: - 80:80 Let's test this out . docker−composeup−dThe−doptionindicatesthatrunthecontainersinthebackground.ItmighttakealittlewhileastheNginximagewillfirstbedownloadedfromDockerHub.Whenitisdone,openlocalhostinyourbrowser,whichshoulddisplayNginx′swelcomepage:Welcometonginx!Ifyouseethispage,thenginxwebserverissuccessfullyinstalledandworking.Furtherconfigurationisrequired.Foronlinedocumentationandsupportpleaserefertonginx.org.Commercialsupportisavailableatnginx.com.Thankyouforusingnginx.Tostopthecontainer,simplyrun: docker-compose stop PHP Replace the content of docker-compose.yml with this one: version: '3.8' services: nginx: ...