question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pact-mock-service is not found when run in docker container `node:v10.15.3`

See original GitHub issue

Software versions

  • OS: docker node:10.15.3
  • Library version: 9.0.4
  • node: v10.15.3

Expected behaviour

Pact provider initialised and tests are started .

Actual behaviour

[2019-09-16T10:13:01.237Z] ERROR: pact-node@9.0.4/25 on 452dacd35513: 
    Pact Binary Error: /bin/sh: 1: ./standalone/linux-x64-1.70.2/bin/pact-mock-service: not found

Steps to reproduce

Run consumer side contract tests in docker container using image node:10.15.3 NB: Everything works fine on version 9.0.3.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mefellowscommented, Sep 16, 2019

The path looks correct, it’s relative to the pact-node dependencies path which is within node_modules.

1reaction
vbotaycommented, Sep 17, 2019

It’s definitely related to docker. It’s done automatically in container during pipeline execution and I was surprised when it stoped working without any changes. I think I have to find some issue in different place and it is not a problem of pact. Sorry for bothering you guys and thank you for fast responses.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pact-mock-service is not found when run in docker container ...
Can you please provide a repro for this? I've seen this issue before when the node modules from a different host (e.g. Mac...
Read more >
Docker: npm not found - node.js - Stack Overflow
This is the solution that worked for me. RUN npm install works, which means it is already installed. This magical -i worked somehow....
Read more >
Docker executor - GitLab Docs
GitLab Runner uses the Docker executor to run jobs on Docker images. You can use the Docker executor to: Maintain the same build...
Read more >
10 best practices to containerize Node.js web applications ...
Don't run containers as root; Safely terminate Node.js Docker web applications; Graceful shutdown for your Node.js web applications; Find and ...
Read more >
Getting Started with Docker Using Node.js(Part I)
We'll use a mocks server so we can focus on Dockerizing the application and not so much the actual code. Open this working...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found