2

I want to get verbose output from mockwire when running in docker using docker compose file.

I tried these three ways but none of them work.

first way

services:
   wiremock:
     image: wiremock
     ports:
       - 8080:8080
     restart: always
     volumes:
       - ./myfolder/mystuff:/home/wiremock
     command: [--verbose]

second way

command: --verbose

third way

command: 
     - --verbose

I keep getting the error:

wiremock exec: "--verbose": executable file not found in $PATH: unknown
savemightlife
  • 69
  • 3
  • 8
  • the image `wiremock` does not exist on dockerhub. If it's a custom image, you need to show your dockerfile. With `wiremock/wiremock` it would work, see https://github.com/wiremock/wiremock-docker/blob/main/docker-entrypoint.sh – The Fool May 10 '22 at 16:31
  • I landed on this question trying to fix a wiremock within kubernetes: I really needed this answer https://stackoverflow.com/a/32302585/3751373 TLDR: you may need the [`Dockerfile`s entrypoint](https://github.com/wiremock/wiremock-docker/blob/131a39594cf0538ebafc2d69ed44d7169c5dea29/Dockerfile#L55) command in your `command` array as well as the flag – Laurence Billingham May 20 '22 at 16:51

1 Answers1

5

I've set up it in this way:

  mocked-services:
    image: wiremock/wiremock:2.33.2
    command: "--global-response-templating --verbose"
Dmytro Melnychuk
  • 2,285
  • 21
  • 23