Error running pupteer docker node js app api

This is my docker file

FROM node:18-alpine3.17

ARG npm-ci-params

WORKDIR /home/pptruser/app
COPY package*.json ./
RUN npm ci $npm-ci-params
COPY . .

# Puppeteer deps
RUN apk --update add --no-cache \
      chromium \
      nss \
      freetype \
      freetype-dev \
      harfbuzz \
      ca-certificates \
      ttf-freefont \
      ttf-liberation

# support chinese language
RUN apk add wqy-zenhei \
    --update-cache \
    --repository http://nl.alpinelinux.org/alpine/edge/testing \
    --allow-untrusted

# support emoji
RUN apk add font-noto-emoji \
    --update-cache \
    --repository http://nl.alpinelinux.org/alpine/edge/community \
    --allow-untrusted
COPY local.conf /etc/fonts/local.conf

# Add user so we don't need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \
    && mkdir -p /home/pptruser/Downloads /app \
    && chown -R pptruser:pptruser /home/pptruser \
    && chown -R pptruser:pptruser /app

# Run everything after as non-privileged user.
USER pptruser

EXPOSE 3000
CMD ["npm", "start"]

The error I get
Apr 8 03:01:02 PM 7 | >>> RUN npm ci $npm-ci-params
Apr 8 03:01:02 PM 8 | COPY . .
Apr 8 03:01:02 PM 9 |
Apr 8 03:01:02 PM --------------------
Apr 8 03:01:02 PM error: failed to solve: process “/bin/sh -c npm ci $npm-ci-params” did not complete successfully: exit code: 1
Apr 8 03:01:02 PM error: exit status 1

Hi,

I would expect there are logs before the lines you shared that show some more detail about what is going wrong.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.