Giter VIP home page Giter VIP logo

nginx-custom-site's Introduction

By default this custom NGINX docker image behave like a regular stock NGINX image. However, it also supports a few customizations if and when needed in addition to have extended packages for convenience.

The customizations supported are:

  • if the INDEX_HTML_CONTENT system variable is passed to the container, the image will replace the index.html file with the content of the variable and turning the body style to lightblue
  • if the HTTP_PORT system variable is passed to the container, the image will configure the /etc/nginx/conf.d/default.conf to listen on the port specified in the variable

The additional packages included are:

  • curl (this is useful to facilitate live debugging or facilitating the creation of containers health checks e.g. curl -f http://localhost/ || exit 1 from within the container)

A docker image is already available on Docker Hub as mreferre/nginx-custom-site.

####Usage

The command below is equivalent to run the stock nginx docker image:

docker run --rm -d -P mreferre/nginx-custom-site:latest

The command below runs a stock nginx image replacing the default index.html file with the settings of the INDEX_HTML_CONTENT variable and will replace the default port 80 in the /etc/nginx/conf.d/default.conf file with port 8080:

docker run --rm -d -e INDEX_HTML_CONTENT="My custom web site" -e HTTP_PORT=8080 -p 8080:8080 mreferre/nginx-custom-site:latest

The variables can be used independently.

nginx-custom-site's People

Contributors

mreferre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.