alpine-node-chromium icon indicating copy to clipboard operation
alpine-node-chromium copied to clipboard

Can't run pact-mock-server

Open nieldw opened this issue 7 years ago • 4 comments

I'm trying to run Pact-JS with Karma to do consumer tests, but I'm unable to run pact-mock-service.

I've created a sample project illustrating the problem: https://github.com/nieldw/pact-karma-alpine-issue

The error I'm getting is:

WARN: [email protected]/1 on 3d34c88a62ad: Pact exited with code 127.

I've tried the solution at https://github.com/pact-foundation/pact-ruby-standalone/wiki/Using-the-pact-ruby-standalone-with-Alpine-Linux-Docker, basically, adding:

RUN apk add --no-cache --virtual build-dependencies build-base

However, this fails with

ERROR: unsatisfiable constraints:
  musl-1.1.19-r4:
    breaks: musl-dev-1.1.19-r7

nieldw avatar Apr 10 '18 11:04 nieldw

Related to https://github.com/pact-foundation/pact-js/issues/154

nieldw avatar Apr 10 '18 13:04 nieldw

Workaround for the unsatisfiable constraint issue:

RUN apk add --no-cache musl=1.1.19-r7
RUN apk add -v --no-cache --virtual build-dependencies build-base

nieldw avatar Apr 11 '18 08:04 nieldw

By also installing bash I can get the pact-mock-service script starting, but then it fails because it can't find the ruby bin. I'm not sure if that's a problem with this image, or with pact not downloading the binary.

RUN apk add --no-cache musl=1.1.19-r7
RUN apk add -v --no-cache --virtual build-dependencies build-base bash
RUN ./node_modules/@pact-foundation/pact-mock-service-linux-x64/bin/pact-mock-service

Results in:

/build/node_modules/@pact-foundation/pact-mock-service-linux-x64/lib/ruby/bin/ruby: line 6: /build/node_modules/@pact-foundation/pact-mock-service-linux-x64/lib/ruby/bin.real/ruby: No such file or directory

nieldw avatar Apr 11 '18 09:04 nieldw

I'm facing the same problem. Any solution for this?

omnibrain avatar Sep 19 '18 15:09 omnibrain