I try to use a gitlab CI pipeline with my angular project in Docker.
But gitlab-runner fais with an error messagen when performing npm ci:
$ [ -d node_modules ] || npm ci
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/@types/node/-/node-12.19.9.tgz failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org registry.npmjs.org:443
I am using a locally installed gitlab-ce instance.
Gitlab-ce Version: 13.7.3-ce.0
Gitlab-Runner: 13.7.0
That’s my Dockerfile:
FROM nginx:1.19.6-alpine
COPY nginx.conf /etc/nginx/nginx.conf
COPY /dist/frontend /usr/share/nginx/html
And that’s my gitlab-ci.yml
stages:
- init
variables:
DIST_DIR: dist/mailadmin-frontend
CLI_VERSION: 7.3.9
cache:
key: ${CI_COMMIT_SHA}
paths: ['mailadmin-frontend/node_modules']
before_script:
- cd /builds/dp/mailadmin-frontend/
- "[ -d node_modules ] || npm ci"
init:
stage: init
image: trion/ng-cli:${CLI_VERSION}
script: ['']
cache:
policy: push
key: ${CI_COMMIT_SHA}
paths: ['mailadmin-frontend/node_modules']
tags:
- docker