From f7b88ce54eb0e24532781ae13da729212bb9432f Mon Sep 17 00:00:00 2001 From: nicolas Date: Wed, 7 Feb 2024 22:24:17 +0100 Subject: [PATCH] no longer running as root --- .dockerignore | 3 ++- dockerfile | 4 ++-- src/master_updates.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.dockerignore b/.dockerignore index dea590e..39d13e1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ node_modules bucket volumes -*.lock \ No newline at end of file +*.lock +chart \ No newline at end of file diff --git a/dockerfile b/dockerfile index d8ec812..bb1f992 100644 --- a/dockerfile +++ b/dockerfile @@ -1,12 +1,12 @@ FROM osgeo/gdal:alpine-small-3.2.1 LABEL maintainer "contact@kalisio.com" + COPY . /opt/bdortho/ WORKDIR /opt/bdortho -RUN apk add -u p7zip nodejs npm rclone curl findutils && npm install - +RUN apk add -u p7zip nodejs npm rclone curl findutils && npm install && chown -R 1000:1000 /opt/bdortho ENTRYPOINT ["node","/opt/bdortho/src/entrypoint.js"] diff --git a/src/master_updates.js b/src/master_updates.js index 80ded31..44d8d4d 100644 --- a/src/master_updates.js +++ b/src/master_updates.js @@ -17,7 +17,7 @@ const DEP_TO_EXCLUDE = env.DEP_TO_EXCLUDE || '' fs.mkdirSync(opts.tmpDir, { recursive: true }) -// Step 1: We if the workers have finished their tasks (if their volume is empty or their "todo" dir is empty or their "workdir" dir is empty) +// Step 1: We if the workers have finished their tasks (if their volume is empty ) const workers = fs.readdirSync(opts.volumes) workers.forEach(worker =>{ if (fs.readdirSync(path.join(opts.volumes, worker)).length > 0){