Git Product home page Git Product logo

openssl-alpine's Introduction

OpenSSL Alpine

Docker image based on Alpine Linux that uses OpenSSL to generate a three tier x509 certificate chain.

x509 is a standard for a public key infrastructure (PKI) to manage digital certificates, public-key encryption and a key part of the Transport Layer Security (TLS) protocol used to secure web and email communication.

Customisation

The image comes with default values, but they can be overridden using the following environment variables when running a docker container to customise the generated certificates:

VARIABLE DESCRIPTION DEFAULT
COUNTRY Certificate subject country string UK
STATE Certificate subject state string Greater London
LOCATION Certificate subject location string London
ORGANISATION Certificate subject organisation string Example
ROOT_CN Root certificate common name Root
ISSUER_CN Intermediate issuer certificate common name Example Ltd
PUBLIC_CN Public certificate common name *.example.com
ROOT_NAME Root certificate filename root
ISSUER_NAME Intermediate issuer certificate filename example
PUBLIC_NAME Public certificate filename public
RSA_KEY_NUMBITS The size of the rsa keys to generate in bits 2048
DAYS The number of days to certify the certificates for 365
KEYSTORE_NAME Keystore filename keystore
KEYSTORE_PASS Keystore password changeit

For example, to run a container, customise variables and mount the certificates in a volume:

docker run --rm \
  -e COUNTRY="ME" \
  -e STATE="Middle Earth" \
  -e LOCATION="The Shire" \
  -e ORGANISATION="Hobbit" \
  -e ISSUER_CN="J R R Tolkien" \
  -e PUBLIC_CN="hobbit.com" \
  -e ISSUER_NAME="tolkien" \
  -e PUBLIC_NAME="hobbit" \
  -v hobbit:/etc/ssl/certs \
  pgarrett/openssl-alpine

List the generated certificates:

ls -la /var/lib/docker/volumes/hobbit/_data

View the public certificate details:

openssl x509 -in /var/lib/docker/volumes/hobbit/_data/hobbit.crt -text -noout

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.