From 2e6a0b37623d11e9d74e84ff0cfea02a54f7b320 Mon Sep 17 00:00:00 2001 From: Renat Nurgaliyev Date: Sun, 15 Sep 2024 19:17:17 +0200 Subject: [PATCH] Remove container build and run scripts --- README.md | 17 ++++++++--------- build-container.sh | 16 ---------------- run-container.sh | 26 -------------------------- 3 files changed, 8 insertions(+), 51 deletions(-) delete mode 100755 build-container.sh delete mode 100755 run-container.sh diff --git a/README.md b/README.md index da12c0e..683f8a6 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ automatically mount it on reboot. The minimum version of Synology DSM that works properly with this KMIP server is DSM 7.2-64570. +Latest Synology DSM which was checked to be compatible with this KMIP server is +DSM 7.2.2-72806. + Based on [PyKMIP](https://github.com/OpenKMIP/PyKMIP) project. ## Installation @@ -33,16 +36,12 @@ $ vim ./config.sh ### Building and runnning container manually -1. Build the container. I don't provide binary images because you don't want to -trust your secrets to unknown binaries. Instead, study the contents of this -repository to feel comfortable, and build a KMIP server yourself -``` -2 ./build-container.sh -``` - -3. Run the container +1. Build and run the container using docker compose. I don't provide binary +images because you don't want to trust your secrets to unknown binaries. +Instead, study the contents of this repository to feel comfortable, and build a +KMIP server yourself. ``` -$ ./run-container.sh +$ docker compose up -d ``` ### Using docker-compose diff --git a/build-container.sh b/build-container.sh deleted file mode 100755 index 31dc2a4..0000000 --- a/build-container.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -if docker -v >/dev/null 2>&1; then - CM=docker -elif podman -v >/dev/null 2>&1; then - CM=podman -else - echo "Container manager not installed. Please install docker or podman." - exit 1 -fi - -WORKDIR=$(cd -- "$(dirname -- "$0")" && pwd) - -$CM build -t dsm-kmip-server:latest "$WORKDIR" diff --git a/run-container.sh b/run-container.sh deleted file mode 100755 index 42e3aeb..0000000 --- a/run-container.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -set -e - -if docker -v >/dev/null 2>&1; then - CM=docker -elif podman -v >/dev/null 2>&1; then - CM=podman -else - echo "Container manager not installed. Please install docker or podman." - exit 1 -fi - -WORKDIR=$(cd -- "$(dirname -- "$0")" && pwd) - -if $CM ps -a | grep dsm-kmip-server >/dev/null 2>&1; then - echo "=== Cleaning up old container" - $CM stop dsm-kmip-server >/dev/null - $CM rm dsm-kmip-server >/dev/null -fi - -echo "=== Starting new container" -$CM run -d --name dsm-kmip-server -p 5696:5696 \ - --mount type=bind,source="$WORKDIR"/state,target=/var/lib/state \ - --mount type=bind,source="$WORKDIR"/certs,target=/var/lib/certs \ - dsm-kmip-server:latest