It looks like this error output from gitlab runner isn't well documented on the Internet so far so I'm starting a topic. Error output:
Step 11/13 : RUN chown -R node /usr/src/app/node_modules
---> Running in d9cb1a93d908
WARNING: Error while executing file based variables removal script error=context canceled job=1 project=0
ERROR: Failed to cleanup volumes
ERROR: Job failed: execution took longer than 30m0s seconds
FATAL: execution took longer than 30m0s seconds
this is coming from gitlab runner installed locally on Ubuntu machine. Any suggestions as to how to troubleshoot this error ?
Dockerfile:
FROM node:16-alpine
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
COPY package-lock.json /usr/src/app/package-lock.json
RUN mkdir /usr/src/app/node_modules
RUN mkdir /usr/src/app/node_modules/.cache
RUN npm config set unsafe-perm true # to avoid permission problems when accessing .cache dir later on
RUN npm ci --loglevel=error
RUN npm i -g --silent --loglevel=error
RUN chown -R node /usr/src/app/node_modules
USER node
CMD ["npm", "start"]
I don't think this is related to gitlab, you are overwriting the owner of every dependency in your project, with nodejs those tend to grow exponentially.
You didn't post your
Dockerfile
, but this would be a matter of just rewriting in the following way: