Docker container for the PyKMIP Service. Official Package: https://github.com/OpenKMIP/PyKMIP
3.2K
References:
I did not create this project, all credit goes to the creators referenced above.
This free open source application has allowed me to get more familiar with VMWare's vCenter Key Management Service, enabling Encryption on VM's and Storage. So I thought I'd make a container for easier deployment.
Create two new directories on the system you're going to be running this container, to allow persistent data storage, and easier access to important files used in the container. The two directories within the container to map to are:
/app/pykmip-data
/app/pykmip-config
The config directory contains two files, policy.json and server.conf. These are pre-setup in this container for testing. Refere to the docs for further information if you wish to alter the config of the server.
The data directory will contain pykmip.database - It is generated upon first server run, and will contain key data. You'll also need to generate and provide a certificate and key file to put in this directory (steps below to create a self-signed cert)
This server runs on port 5696 by default, so you'll need this open.
version: "3.8"
services:
PyKMIP:
image: biska/pykmip:v1.0.0
container_name: pykmip
volumes:
- /home/user/docker_data/pykmip/pykmip-data:/app/pykmip-data
- /home/user/docker_data/pykmip/pykmip-config:/app/pykmip-config
ports:
- 5696:5696
restart: unless-stopped
$ openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /home/user/docker_data/pykmip/pykmip-data/selfsigned.key -out /home/user/docker_data/pykmip/pykmip-data/selfsigned.crt
$ sudo docker compose pull
$ sudo docker compose up -d
The container should now be running. If you're wanting to add this to VMWare's vCenter as a KMS server, see below:
docker pull biska/pykmip:v1.0.0