From 5dd67c198bced26316ef0da13c3000ccd89c23a8 Mon Sep 17 00:00:00 2001 From: Pawel Proskurnicki Date: Thu, 9 Oct 2025 14:48:41 +0200 Subject: [PATCH] containerfiles: update PCCS image Changed workspace image to nodejs-20-minimal and added support for environmental values handling via custom-environment-variables.json Signed-off-by: Pawel Proskurnicki --- containerfiles/pccs/Containerfile | 9 +++-- .../pccs/custom-environment-variables.json | 14 ++++++++ containerfiles/pccs/default.json | 34 +++++++++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 containerfiles/pccs/custom-environment-variables.json create mode 100644 containerfiles/pccs/default.json diff --git a/containerfiles/pccs/Containerfile b/containerfiles/pccs/Containerfile index 096398d..c4b065f 100644 --- a/containerfiles/pccs/Containerfile +++ b/containerfiles/pccs/Containerfile @@ -17,9 +17,12 @@ WORKDIR ../../QuoteGeneration/pccs RUN npm config set engine-strict true \ && npm install -FROM registry.access.redhat.com/ubi9/nodejs-20:latest +FROM registry.access.redhat.com/ubi9/nodejs-20-minimal:latest -WORKDIR intel/pccs -COPY --from=builder --chown=default:1001 /opt/app-root/src/SGXDataCenterAttestationPrimitives/QuoteGeneration/pccs . +WORKDIR /opt/intel/pccs + +COPY --from=builder --chown=1001:users /opt/app-root/src/SGXDataCenterAttestationPrimitives/QuoteGeneration/pccs . +COPY --chown=1001:users default.json config/ +COPY --chown=1001:users custom-environment-variables.json config/ ENTRYPOINT ["/usr/bin/node", "pccs_server.js"] diff --git a/containerfiles/pccs/custom-environment-variables.json b/containerfiles/pccs/custom-environment-variables.json new file mode 100644 index 0000000..60364e3 --- /dev/null +++ b/containerfiles/pccs/custom-environment-variables.json @@ -0,0 +1,14 @@ +{ + "HTTPS_PORT": "PCCS_HTTPS_PORT", + "ApiKey": "PCCS_API_KEY", + "proxy": "CLUSTER_HTTPS_PROXY", + "UserTokenHash": "PCCS_USER_TOKEN_HASH", + "AdminTokenHash": "PCCS_ADMIN_TOKEN_HASH", + "CachingFillMode": "PCCS_FILL_MODE", + "LogLevel": "PCCS_LOG_LEVEL", + "sqlite": { + "database": "PCCS_DB_NAME", + "username": "PCCS_DB_USERNAME", + "password": "PCCS_DB_PASSWORD" + } +} \ No newline at end of file diff --git a/containerfiles/pccs/default.json b/containerfiles/pccs/default.json new file mode 100644 index 0000000..803f230 --- /dev/null +++ b/containerfiles/pccs/default.json @@ -0,0 +1,34 @@ +{ + "HTTPS_PORT": 8042, + "hosts": "0.0.0.0", + "uri": "https://api.trustedservices.intel.com/sgx/certification/v4/", + "ApiKey": "", + "proxy": "", + "RefreshSchedule": "0 0 1 * * *", + "UserTokenHash": "", + "AdminTokenHash": "", + "CachingFillMode": "LAZY", + "OPENSSL_FIPS_MODE": false, + "LogLevel": "info", + "DB_CONFIG": "sqlite", + "sqlite": { + "database" : "database", + "username" : "username", + "password" : "password", + "options": { + "host": "localhost", + "dialect": "sqlite", + "pool": { + "max": 5, + "min": 0, + "acquire": 30000, + "idle": 10000 + }, + "define": { + "freezeTableName": true + }, + "logging": true, + "storage": "/var/cache/pccs/pckcache.db" + } + } +} \ No newline at end of file