From c9735ac752f7086a1094541d99fe4e2bcb5722dd Mon Sep 17 00:00:00 2001 From: Giovanni Condello Date: Tue, 17 Jun 2025 22:59:28 +0200 Subject: [PATCH 1/2] Set non-root user in Dockerfile --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 0378a5e..c4c509a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,6 @@ COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} COPY src/ . COPY examples/ . +USER 185:185 + CMD [ "python", "./main.py"] \ No newline at end of file From dd745c2bd90e19027e46376ab77be510bd7304c5 Mon Sep 17 00:00:00 2001 From: Giovanni Condello Date: Tue, 17 Jun 2025 23:00:16 +0200 Subject: [PATCH 2/2] Move example charging stations config path to a sub-folder Fixes running the docker-compose on windows as well as we cannot bind mount files --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8d21703..4f7e2b9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,5 +11,6 @@ services: - MQTT_PASSWORD=${MQTT_PASSWORD} - SAIC_USER=${SAIC_USERNAME} - SAIC_PASSWORD=${SAIC_PWD} + - CHARGING_STATIONS_JSON=/usr/src/app/config/charging-stations.json volumes: - - ./charging-stations.json:/usr/src/app/charging-stations.json + - ./examples:/usr/src/app/config/