From 4fc54ec9e0a76b97dde0c5d7d45bf5f7c6afbabf Mon Sep 17 00:00:00 2001 From: Renat Nurgaliyev Date: Tue, 6 Feb 2024 11:10:18 +0100 Subject: [PATCH] Minor updates * Tested compatibility with DSM7.2.1-69057 Update 4 * Bump alpine version * Prefer more popular docker over podman --- Dockerfile | 4 ++-- build-container.sh | 8 ++++---- run-container.sh | 9 ++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index b11b0f3..3ca4bcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM alpine:3.17 +FROM alpine:3.19 RUN apk add --no-cache py3-pip openssl RUN apk add --no-cache --virtual build-deps \ python3-dev openssl-dev libffi-dev musl-dev gcc rust cargo && \ - pip install pykmip && \ + pip install pykmip --break-system-packages && \ apk del build-deps RUN mkdir -p /etc/pykmip \ diff --git a/build-container.sh b/build-container.sh index 4cb2d3b..31dc2a4 100755 --- a/build-container.sh +++ b/build-container.sh @@ -2,12 +2,12 @@ set -e -if podman -v >/dev/null 2>&1; then - CM=podman -elif docker -v >/dev/null 2>&1; then +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 podman or docker." + echo "Container manager not installed. Please install docker or podman." exit 1 fi diff --git a/run-container.sh b/run-container.sh index 6942e69..42e3aeb 100755 --- a/run-container.sh +++ b/run-container.sh @@ -2,12 +2,12 @@ set -e -if podman -v >/dev/null 2>&1; then - CM=podman -elif docker -v >/dev/null 2>&1; then +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 podman or docker." + echo "Container manager not installed. Please install docker or podman." exit 1 fi @@ -21,7 +21,6 @@ fi echo "=== Starting new container" $CM run -d --name dsm-kmip-server -p 5696:5696 \ - --restart=unless-stopped \ --mount type=bind,source="$WORKDIR"/state,target=/var/lib/state \ --mount type=bind,source="$WORKDIR"/certs,target=/var/lib/certs \ dsm-kmip-server:latest