Hello,
I have my CI set up like that:
image: docker:latest
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay
cache:
untracked: true
key: "$CI_PROJECT_ID"
paths:
- node_modules/
- app/node_modules/
stages:
- package
docker-build:
stage: package
variables:
DOCKER_DRIVER: overlay
only:
- master
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
- docker build -t registry.gitlab.com/mwurbanowicz/***/api .
- docker push registry.gitlab.com/mwurbanowicz/***/api
This is my Dockerfile:
FROM node:alpine
WORKDIR /app
COPY package.json /app
RUN npm install
COPY . /app
EXPOSE 3000
CMD [ "npm", "start" ]
I can’t get cache for node_modules at all.
All the time getting mssage that no files have been found.
Anyone can tell me what is wrong? It’s pretty straight forward so I have no idea why it’s not working.