I built the follow Docker container
FROM node:20-alpine as ember
WORKDIR /usr/app
COPY package*.json /usr/app/
RUN apk fix && \
apk --no-cache --update add git && \
npm clean-install
and uploaded to a registery.
npm run built
works as expected from docker compose up
with compose.yaml
as
services:
frontend:
image: my-docker-image
volumes:
- type: bind
source: .
target: /usr/app
command: npm run build
When I try to run npm run build
from GitLab CI, I get the error sh: ember: not found
. The GitLab CI task/job is
npm-run:
image: my-docker-image
script:
- npm run build
Why npm is not working in GitLab CI?
package.json
content.package.json
andpackage-lock.json
in gist.github.com/rgaiacs/20627714cb444a3e1fc62691ab2fd48c