Skip to content

sjohal29/simple-nginx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple NGINX

Simple NGINX is a fairly simple, static website running on NGINX to demonstrating NGINX in a Docker container.

Building from Scratch

Simple NGINX is hosted in a Docker Hub repository under arueth/simple-nginx but you can also build it locally with the following steps:

$ git clone https://github.com/docker-demo/simple-nginx.git
$ cd simple-nginx
$ docker build -t simple-nginx .

Running the Built Container

$ docker run -it -p 8080:80 simple-nginx

Docker Template

This sections explains how to create a template for use with docker template or the Docker Desktop Application Designer

Prerequisites

  1. Create the app-template organization in your registry.
  2. Create the app-template/simple-nginx-db repository in your registry.
  3. Create the app-template/simple-nginx-front-end repository in your registry.

Build the application template images

Linux

$ export REGISTRY_FQDN="<FQDN of registry>"
$ docker login ${REGISTRY_FQDN}

$ cd simple-nginx/template/services
$ ./stage-images.sh

Windows

> $REGISTRY_FQDN="<FQDN of registry>"
> docker login ${REGISTRY_FQDN}

> cd .\simple-nginx\template\services
> .\stage-images.ps1

Edit the library file

  1. Open the simple-nginx/template/library.yaml file in your favorite editor.
  2. Replace <registry fqdn> with the FQDN of your registry, it should be the same value used in the Build the application template images section above.
  3. Add the library.yaml local repository to the docker template settings

Linux

  1. On your computer, open ~/.docker/application-template/preferences.yaml
  2. Add the local repository as the first item in the repositories list:
repositories:
- name: simple-nginx
  url: file:///<path to simpel-nginx folder>/template/library.yaml

Windows

  1. On your computer, open %USERPROFILE%\.docker\application-template\preferences.yaml
  2. Add the local repository as the first item in the repositories list:
repositories:
- name: simple-nginx
  url: file://C:/<path to simpel-nginx folder>/template/library.yaml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 79.8%
  • CSS 14.6%
  • Dockerfile 2.9%
  • PowerShell 1.6%
  • Shell 1.1%