Giter Club home page Giter Club logo

docker-nginx-rproxy-auth's Introduction

Summary

Nginx reverse proxy image with basic authentication. This allow to protect the access to a web interface. The unsecure service to protect will run on a protected network that does not allow access from the outside word. The access to this service from the outside word will onyl be allowed through the proxy with basic authentication.

This means the unsecure service and the proxy are connected together using docker linking system.

Build the image

To create this image, execute the following command in the docker-nginx-rproxy-auth folder.

docker build \
    -t cburki/nginx-rproxy-auth
    .

Configure the image

The following environment variables must be set in order to configure the proxy.

- PROXY_AUTH_USERNAME : The username to access the service.
- PROXY_AUTH_PASSWORD : The password to access the service.
- PROXY_SERVER_NAME : The server name nginx will use to route the request.
- SERVICE_ADDRESS : The IP address or hostname of the service to protect is listening on.
- SERVICE_PORT : The port the service to protect is listening on.

Run the image

When you run the image, you will link the service you would like to protect and specify the environment variables described above. You will also publish the port you want the proxy to listen on.

docker run \
    --name nginx-rproxy-auth \
    --link <service_container_name>:<service_alias> \
    -d \
    -e PROXY_AUTH_USERNAME=<username> \
    -e PROXY_AUTH_PASSWORD=<your_secret_password> \
    -e PROXY_SERVER_NAME=<server_name> \
    -e SERVICE_ADDRESS=<service_alias> \
    -e SERVICE_PORT=<service_port> \
    -p <publish_port>:<publish_port> \
    cburki/nginx-rproxy-auth:latest

docker-nginx-rproxy-auth's People

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.