Giter Site home page Giter Site logo

simple-nginx's Introduction

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

simple-nginx's People

Contributors

arueth avatar ruizmarlon avatar millerdz 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.