Sign inSign up

theohbrothers/docker-easyrsa

By theohbrothers

•Updated 7 days ago

Dockerized easyrsa 🐳

Image
0

100K+

theohbrothers/docker-easyrsa repository overview

⁠docker-easyrsa

github-actions github-release docker-image-size

Dockerized easy-rsa⁠.

The base image is alpine.

⁠Tags

TagDockerfile Build Context
:3.2.7, :latestView⁠
:3.2.6View⁠
:3.2.5View⁠
:3.2.4View⁠
:3.2.3View⁠
:3.2.2View⁠
:3.2.1View⁠
:3.2.0View⁠
:3.1.7View⁠
:3.1.6View⁠
:3.1.5View⁠
:3.1.4View⁠
:3.1.3View⁠
:3.1.2View⁠
:3.1.1View⁠
:3.1.0View⁠
:3.0.9View⁠
:3.0.8View⁠
:3.0.7View⁠
:3.0.6View⁠
:3.0.5View⁠
:3.0.4View⁠
:3.0.3View⁠
:3.0.2View⁠
:3.0.1View⁠

All images are based on Alpine.

⁠Usage

In this image, the PKI will be stored in /data/pki (i.e. EASYRSA_PKI=/data/pki, see Dockerfile).

# Generate /data/pki
docker run --rm -it -v data:/data theohbrothers/docker-easyrsa:3.2.7 init-pki
# Generate CA, server and client certs
docker run --rm -it -e EASYRSA_BATCH=true -v data:/data theohbrothers/docker-easyrsa:3.2.7 build-ca nopass
docker run --rm -it -e EASYRSA_BATCH=true -v data:/data theohbrothers/docker-easyrsa:3.2.7 build-server-full server-01 nopass
docker run --rm -it -e EASYRSA_BATCH=true -v data:/data theohbrothers/docker-easyrsa:3.2.7 build-client-full client-01 nopass

# Alternatively, a nice one liner to do everything
docker run --rm -it -e EASYRSA_BATCH=true -v data:/data theohbrothers/docker-easyrsa:3.2.7 sh -c 'set -e; easyrsa init-pki; easyrsa build-ca nopass; easyrsa build-server-full server-01 nopass; easyrsa build-client-full client-01 nopass; find /data/pki'

According to easy-rsa documentation⁠, there are four ways to run easy-rsa, namely:

  • Command-line options
  • Environment variables
  • vars file
  • Built-in defaults
⁠Command line

See easy-rsa documentation on command line options and their matching environment variables here⁠.

⁠Environment variables

See easy-rsa documentation on environment variables here⁠.

⁠vars file

See easy-rsa documentation on using vars file here⁠.

See an example of a vars file here⁠.

⁠Development

Requires Windows powershell or pwsh⁠.

# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants
Install-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose

# Edit ./generate templates

# Generate the variants
Generate-DockerImageVariants .
⁠Variant versions

versions.json⁠ contains a list of Semver⁠ versions, one per line.

To update versions in versions.json:

./Update-Versions.ps1

To update versions in versions.json, and open a PR for each changed version, and merge successful PRs one after another (to prevent merge conflicts), and finally create a tagged release and close milestone:

$env:GITHUB_TOKEN = 'xxx'
./Update-Versions.ps1 -PR -AutoMergeQueue -AutoRelease

To perform a dry run, use -WhatIf.

Tag summary

Content type

Image

Digest

sha256:105a855f2…

Size

6.1 MB

Last updated

7 days ago

docker pull theohbrothers/docker-easyrsa:20260920.0.0-4f5c641-3.1.5