This is a sample application shows how to run a hello world application and expose it through Nginx using a simple docker-compose file.
- add the record
127.0.0.1 helloworld.comto/etc/hostson your system. - Port
80and3030should not be allocated to any application. DockerandDocker-composeshould be installed on the system.
Clone the git repository
git clone https://github.com/mohamedfazrin/helloworld.git/
Get in to the directory
cd helloworld
Run the application
docker-compose up -d
Note
-dis used to run the application in background
To check the containers running
docker-compose ps
Access the application using:
http://helloworld.com
To stop the application
docker-compose down