-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1eeda76
commit 874540b
Showing
6 changed files
with
207 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM alpine:edge | ||
|
||
RUN apk add --no-cache easy-rsa=3.1.5-r0 iptables | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
RUN chmod +x /docker-entrypoint.sh | ||
|
||
# alpine easyrsa top-level directory. Use command find / -name 'easyrsa' | ||
RUN echo "Looking for easyrsa binary" \ | ||
&& ls '/usr/share/easy-rsa/easyrsa' | ||
ENV EASYRSA=/usr/share/easy-rsa | ||
|
||
WORKDIR /usr/share/easy-rsa | ||
|
||
# alpine openssl.cnf location. Use command find / -name 'openssl*.cnf' | ||
# < v3.0.4: https://github.com/OpenVPN/easy-rsa/blob/v3.0.0/easyrsa3/easyrsa#L1032-L1033 | ||
# >= v3.0.4: | ||
RUN echo "Looking for openssl.cnf" \ | ||
&& find /etc /usr -name 'openssl*.cnf' | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
version: '2.1' | ||
services: | ||
easyrsa: | ||
container_name: easyrsa | ||
image: theohbrothers/docker-easyrsa:v3.1.5-alpine-edge | ||
|
||
# Uncomment and configure these environment to your needs. The following are the default values, according to: https://github.com/OpenVPN/easy-rsa/blob/v3.0.8/doc/EasyRSA-Advanced.md#configuration-reference | ||
# Using environment variables is preferred to using a vars file | ||
# Double dollar signs '$$' is to escape a dollar sign in the docker-compose yaml parser, see: https://stackoverflow.com/a/40621373 | ||
# environment: | ||
# - EASYRSA_SSL_CONF=/etc/ssl/openssl.cnf | ||
# - EASYRSA=$${0%/*} | ||
# - EASYRSA_OPENSSL=openssl | ||
# - EASYRSA_SSL_CONF=$$EASYRSA/openssl-easyrsa.cnf | ||
# - EASYRSA_PKI=$$PWD/pki | ||
# - EASYRSA_DN=cn_only | ||
# - EASYRSA_REQ_COUNTRY=US | ||
# - EASYRSA_REQ_PROVINCE=California | ||
# - EASYRSA_REQ_CITY=San Francisco | ||
# - EASYRSA_REQ_ORG=Copyleft Certificate Co | ||
# - [email protected] | ||
# - EASYRSA_REQ_OU=My Organizational Unit | ||
# - EASYRSA_KEY_SIZE=2048 | ||
# - EASYRSA_ALGO=rsa | ||
# - EASYRSA_CURVE=secp384r1 | ||
# - EASYRSA_CA_EXPIRE=3650 | ||
# - EASYRSA_CERT_EXPIRE=180 | ||
# - EASYRSA_CERT_RENEW=30 | ||
# - EASYRSA_NS_SUPPORT=no | ||
# - EASYRSA_NS_COMMENT=Easy-RSA Generated Certificate | ||
# - EASYRSA_TEMP_FILE=$$EASYRSA_PKI/extensions.temp | ||
# - EASYRSA_EXT_DIR=$$EASYRSA/x509-types | ||
# - EASYRSA_REQ_CN=ChangeMe | ||
# - EASYRSA_DIGEST=sha256 | ||
# - EASYRSA_BATCH= | ||
|
||
# Uncomment this to mount your own openssl.cnf, vars file(s) | ||
# volumes: | ||
# - ./path/to/openssl.conf:/etc/ssl/openssl.cnf | ||
# - ./path/to/vars:/etc/ssl/openssl.cnf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
set -aeo pipefail | ||
|
||
# Generate the command line. easy-rsa man: https://github.com/OpenVPN/easy-rsa/blob/v3.0.0/README.quickstart.md | ||
echo "Generating command line" | ||
set "$EASYRSA/easyrsa" "$@" | ||
|
||
# Exec | ||
echo "easyrsa command line: $@" | ||
exec "$@" |