EJBCA is an enterprise class PKI Certificate Authority software, built using Java (JEE) technology.
Overview of EJBCA Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
docker run --name ejbca bitnami/ejbca:latest
curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/ejbca/docker-compose.yml > docker-compose.yml
docker-compose up -d
Warning: This quick setup is only intended for development environments. You are encouraged to change the insecure default credentials and check out the available configuration options in the Configuration section for a more secure deployment.
- Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems.
- With Bitnami images the latest bug fixes and features are available as soon as possible.
- Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs.
- All our images are based on minideb a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading Linux distribution.
- All Bitnami images available in Docker Hub are signed with Docker Content Trust (DCT). You can use
DOCKER_CONTENT_TRUST=1
to verify the integrity of the images. - Bitnami container images are released on a regular basis with the latest distribution packages available.
Looking to use EJBCA in production? Try VMware Application Catalog, the enterprise edition of Bitnami Application Catalog.
Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers in our docs.
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags in our documentation page.
You can see the equivalence between the different tags by taking a look at the tags-info.yaml
file present in the branch folder, i.e bitnami/ASSET/BRANCH/DISTRO/tags-info.yaml
.
Subscribe to project updates by watching the bitnami/containers GitHub repo.
The recommended way to get the Bitnami EJBCA Docker Image is to pull the prebuilt image from the Docker Hub Registry.
docker pull bitnami/ejbca:latest
To use a specific version, you can pull a versioned tag. You can view the list of available versions in the Docker Hub Registry.
docker pull bitnami/ejbca:[TAG]
If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the docker build
command. Remember to replace the APP
, VERSION
and OPERATING-SYSTEM
path placeholders in the example command below with the correct values.
git clone https://github.com/bitnami/containers.git
cd bitnami/APP/VERSION/OPERATING-SYSTEM
docker build -t bitnami/APP:latest .
EJBCA requires access to a MySQL or MariaDB database to store information. We'll use our very own MariaDB image for the database requirements.
The main folder of this repository contains a functional docker-compose.yml
file. Run the application using it as shown below:
curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/ejbca/docker-compose.yml > docker-compose.yml
docker-compose up -d
If you want to run the application manually instead of using docker-compose
, these are the basic steps you need to run:
docker network create ejbca-network
$ docker volume create --name mariadb_data
docker run -d --name mariadb \
--env ALLOW_EMPTY_PASSWORD=yes \
--env MARIADB_USER=bn_ejbca \
--env MARIADB_PASSWORD=Bitnami1234 \
--env MARIADB_DATABASE=bitnami_ejbca \
--network ejbca-network \
--volume mariadb_data:/bitnami/mariadb \
bitnami/mariadb:latest
$ docker volume create --name ejbca_data
docker run -d --name ejbca \
-p 8080:8080 -p 8443:8443 \
--env ALLOW_EMPTY_PASSWORD=yes \
--env EJBCA_DATABASE_USERNAME=bn_ejbca \
--env EJBCA_DATABASE_PASSWORD=Bitnami1234 \
--env EJBCA_DATABASE_HOST=mariadb \
--env EJBCA_DATABASE_NAME=bitnami_ejbca \
--network ejbca-network \
--volume ejbca_data:/bitnami/wildfly \
bitnami/ejbca:latest
Access your application at http://your-ip:8080/ejbca/
If you remove the container all your data will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.
For persistence you should mount a directory at the /bitnami/wildfly
path. If the mounted directory is empty, it will be initialized on the first run.
docker run \
-v /path/to/ejbca-persistence:/bitnami/wildfly \
bitnami/ejbca:latest
You can also do this with a minor change to the docker-compose.yml
file present in this repository:
ejbca:
...
volumes:
- - 'wildfly_data:/bitnami/wildfly'
+ - /path/to/ejbca-persistence:/bitnami/wildfly
...
-volumes:
- ejbca_data:
- driver: local
The EJBCA instance can be customized by specifying environment variables on the first run. The following environment variables are available:
EJBCA_HTTP_PORT_NUMBER
: HTTP port number. Defaults to8080
.EJBCA_HTTPS_PORT_NUMBER
: HTTPS port number. Default to8443
.EJBCA_HTTPS_ADVERTISED_PORT_NUMBER
: Port number used in the rendered URLs for the admistrator login. Default to8443
.EJBCA_ADMIN_USERNAME
: EJBCA administrator username. Defaults tosuperadmin
.EJBCA_ADMIN_PASSWORD
: EJBCA administrator password. Defaults toBitnami1234
.EJBCA_DATABASE_HOST
: Database hostname. No defaults.EJBCA_DATABASE_PORT
: Database port name. Defaults to3306
.EJBCA_DATABASE_NAME
: Database name. No defaults.EJBCA_DATABASE_USERNAME
: Database username. No defaults.EJBCA_DATABASE_PASSWORD
: Database password. No defaults.EJBCA_BASE_DN
: Base DN for the CA. Defaults toO=Example CA,C=SE,UID=c-XXXXXXX
, whereXXXXXXX
is a random generated ID.EJBCA_CA_NAME
: CA Name. Defaults toManagementCA
JAVA_OPTS
: Java options. Defaults to-Xms2048m -Xmx2048m -XX:MetaspaceSize=192M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Dhibernate.dialect=org.hibernate.dialect.MySQL5Dialect -Dhibernate.dialect.storage_engine=innodb
.EJBCA_SERVER_CERT_FILE
: User provided keystore file. No defaults.EJBCA_SERVER_CERT_PASSWORD
: User provided keystore file password. No defaults.EJBCA_SMTP_HOST
: SMTP Email server address. Defaults tolocalhost
.EJBCA_SMTP_PORT
: SMTP Email server port. Defaults to25
.EJBCA_SMTP_FROM_ADDRESS
: SMTP from email address. Defaults to[email protected]
.EJBCA_SMTP_TLS
: SMTP TLS authentication: Defaults tofalse
.EJBCA_SMTP_USERNAME
: SMTP authentication username. No defaults.EJBCA_SMTP_PASSWORD
: SMTP authentication password. No defaults.
The Bitnami EJBCA Docker image sends the container logs to stdout
. To view the logs:
docker logs ejbca
You can configure the containers logging driver using the --log-driver
option if you wish to consume the container logs differently. In the default configuration docker uses the json-file
driver.
The Bitnami EJBCA Docker image contains functions to execute any shell scripts after startup. These scripts are executed during the initialization of the EJBCA Wildfly installation.
You can add custom script into the /docker-entrypoint-init.d
directory. All files in the directory will be executed using bash.
Bitnami provides up-to-date versions of EJBCA, including security patches, soon after they are made upstream. We recommend that you follow these steps to upgrade your container.
docker pull bitnami/ejbca:latest
Stop the currently running container using the command
docker stop ejbca
docker rm -v ejbca
Re-create your container from the new image.
docker run --name ejbca bitnami/ejbca:latest
The persistence has been refactorized and the volume mount point was moved from /bitnami/ejbca
to /bitnami/wildfly
.
In previous versions only password files were persisted, making the container was unable to restart. The initialization logic has been changed as well as the persisted data directories. The Wildlfy configuration and data directories are now persisted, making the container able to automatically restart. The time that the container takes to restart has also been improved. Due to the mentioned changes, the automatic upgrade from previous image versions is not supported and requires a manual migration.
We'd love for you to contribute to this container. You can request new features by creating an issue or submitting a pull request with your contribution.
If you encountered a problem running this container, you can file an issue. For us to provide better support, be sure to fill the issue template.
Copyright © 2023 VMware, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.