Posts

Showing posts from December, 2017

nginx on Docker

nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server Docker  is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud I’m going to do a quick run thru of building a web server that returns ‘hello world’ as html and json, using Nginx and Docker under the covers Make sure you have docker & nginx installed before proceeding further Run the following commands to set up files & folders  mkdir hello_world_docker_nginx cd hello_world_docker_nginx touch Dockerfile docker-compose.yml mkdir src conf touch src/index.html conf/nginx.conf After running the above commands, file structure would look like ├── Dockerfile ├── conf │   └── nginx.conf ├── docker-compose.yml └── src └── index.html copy the below contents in the mentioned files index.html : <!DOCTYPE html> <html> <he...