diff --git a/components/runtimes/nodejs/nodejs18/Dockerfile b/components/runtimes/nodejs/nodejs18/Dockerfile index 8917f9175..123ed18c6 100644 --- a/components/runtimes/nodejs/nodejs18/Dockerfile +++ b/components/runtimes/nodejs/nodejs18/Dockerfile @@ -9,11 +9,15 @@ RUN mkdir -p /usr/src/app RUN mkdir -p /usr/src/app/lib WORKDIR /usr/src/app -COPY ./nodejs18/package.json /usr/src/app/ +COPY --chown=root:root ./nodejs18/package.json /usr/src/app/ +RUN chmod 644 /usr/src/app/package.json + RUN npm install && npm cache clean --force -COPY ./lib /usr/src/app/lib +COPY --chown=root:root ./lib /usr/src/app/lib +RUN chmod -R 755 /usr/src/app/lib -COPY ./server.js /usr/src/app/server.js +COPY --chown=root:root ./server.js /usr/src/app/server.js +RUN chmod 644 /usr/src/app/server.js CMD ["npm", "start"] diff --git a/components/runtimes/nodejs/nodejs20/Dockerfile b/components/runtimes/nodejs/nodejs20/Dockerfile index b9256bc06..c4df65fb0 100644 --- a/components/runtimes/nodejs/nodejs20/Dockerfile +++ b/components/runtimes/nodejs/nodejs20/Dockerfile @@ -9,11 +9,15 @@ RUN mkdir -p /usr/src/app RUN mkdir -p /usr/src/app/lib WORKDIR /usr/src/app -COPY ./nodejs20/package.json /usr/src/app/ +COPY --chown=root:root ./nodejs20/package.json /usr/src/app/ +RUN chmod 644 /usr/src/app/package.json + RUN npm install && npm cache clean --force -COPY ./lib /usr/src/app/lib +COPY --chown=root:root ./lib /usr/src/app/lib +RUN chmod -R 755 /usr/src/app/lib -COPY ./server.js /usr/src/app/server.js +COPY --chown=root:root ./server.js /usr/src/app/server.js +RUN chmod 644 /usr/src/app/server.js CMD ["npm", "start"] diff --git a/components/runtimes/python/python312/Dockerfile b/components/runtimes/python/python312/Dockerfile index a8186ef95..261f2b142 100644 --- a/components/runtimes/python/python312/Dockerfile +++ b/components/runtimes/python/python312/Dockerfile @@ -7,10 +7,13 @@ LABEL source = git@github.com:kyma-project/kyma.git RUN apk add --no-cache --virtual .build-deps build-base linux-headers COPY ./python312/requirements.txt /kubeless/requirements.txt +RUN chmod 644 /kubeless/requirements.txt RUN pip install --no-cache-dir -r /kubeless/requirements.txt COPY ./ / +RUN chmod -R 755 /lib +RUN chmod 644 /kubeless.py WORKDIR / diff --git a/components/runtimes/python/python39/Dockerfile b/components/runtimes/python/python39/Dockerfile index d913c4ac3..245c53187 100644 --- a/components/runtimes/python/python39/Dockerfile +++ b/components/runtimes/python/python39/Dockerfile @@ -7,10 +7,13 @@ LABEL source = git@github.com:kyma-project/kyma.git RUN apk add --no-cache --virtual .build-deps build-base linux-headers COPY ./python39/requirements.txt /kubeless/requirements.txt +RUN chmod 644 /kubeless/requirements.txt RUN pip install --no-cache-dir -r /kubeless/requirements.txt COPY ./ / +RUN chmod -R 755 /lib +RUN chmod 644 /kubeless.py WORKDIR /