3

I'm trying to install nodeJs, npm and newman in my docker image, so I have this in the docker file :

FROM python:3.6.1-alpine
RUN apk update && \
    apk add --no-cache nodejs-npm && \
    apk add --update nodejs  && \
    npm install newman --global

That gives me this error:

ERROR: unsatisfiable constraints:
  nodejs-npm (missing):
    required by: world[nodejs-npm]

I got the command from this question: How to install npm in alpine linux

How can I fix this?

Souad
  • 4,856
  • 15
  • 80
  • 140

1 Answers1

2

Docker image python:3.6.1-alpine is based on Alpine Linux v3.4.

According to alpine packages portal, npm binary can be found in nodejs package in Alpine Linux version 3.4.

So, the final Dockerfile is:

FROM python:3.6.1-alpine
RUN apk update && \
    apk add --update nodejs  && \
    npm install newman --global
nickgryg
  • 25,567
  • 5
  • 77
  • 79