Git Product home page Git Product logo

docker-nginx-acme's Introduction

Nginx with embedded Let's Encrypt client ACME.sh

Very small and easy useable docker container with Nginx web-server and "Let's Encrypt" client - ACME.sh.
After the initial issue of the certificate, its updating is automated by cron in container!

Supported versions:

Old releases:

Container create short manual:

  1. Create directories for docker container volumes:

    mkdir -p /var/docker/nginx/ssl /var/docker/nginx/conf.d
  2. Generate a DH Parameter (Key) File (recommended 2048 bits):

    openssl dhparam -out /var/docker/nginx/ssl/dhparam.pem 2048
  3. Create configs for Nginx in /var/docker/nginx: See the simple examples in GitHub Repository and Mozilla SSL Configuration Generator.

  4. Create user-defined network:

    sudo docker network create nginx
  5. Create docker container:

    sudo docker run \
    --name nginx \
    --hostname nginx \
    --network nginx \
    -p 80:80 \
    -p 443:443 \
    -e ACCOUNT_CONF_PATH=/etc/nginx/ssl/acme.sh.conf \
    -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro \
    -v /var/docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro \
    -v /var/docker/nginx/conf.d:/etc/nginx/conf.d:ro \
    -v /var/docker/nginx/ssl:/etc/nginx/ssl:rw \
    -v /var/docker/nginx/logs:/var/log/nginx:rw \
    -v /var/docker/nginx/www:/var/www:rw \
    -d --restart always \
    magnaz/nginx-acme:1.12-alpine
  6. Initial issue "Let's Encrypt" certificate:

    sudo docker exec nginx \
    acme.sh --issue \
    -w /var/www/example.com \
    -d example.com -d www.example.com

docker-nginx-acme's People

Contributors

magna-z avatar

Watchers

James Cloos 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.