Public Repository

Last pushed: a day ago
Short Description
A static web server with find & replace support for environment variables
Full Description

Getting Started

This repository is used to generate the images available in the Docker hub. Using this image for your own project is as simple as creating a Dockerfile with the two lines below:

FROM nstapelbroek/static-webserver:1
COPY ./dist /var/www

Using enviornment variables

When this container bootstraps, a script will find and replace all occurrences of {container.env.%variableName%} and replace them for their matching values passed in the environment variables of your container.

For instance, a HTML file containing the code:

<p>
    My backend is located at {container.env.BACKEND_URL}
</p>

Ran with an environment variable BACKEND_URL=https://api.someproject.com, will result in:

What tag should you use

There are a couple of tags available for this image:

  • 1 referes to its equaly named support branch for preparing new minor or patch releases. This branch will be auto-rebuild every day meaning you'll also get the latest updates from the upstream nginx image. Use this branch whenever you can.
  • 1.x.x referes to an release. These releases are not auto-rebuild (yet) so you'll miss out on any updates or patches. It holds a good purpose if you want to pin to a specific release.
  • latest referes to a build with new features or improvements that are potentially BC-breaking.

Read more on GitHub

Docker Pull Command
Owner
nstapelbroek