https://linen.dev logo
Title
s

Sanjay Adhikari

02/27/2023, 9:17 PM
Hey folks, I am using wiremock server in a container alongside my application server container in the same kube pod. I am getting a port conflict where my app is unable to start at 8080 because wiremock by default listens to 8080. Is there a way to configure wiremock to listen on a different port in dockerfile?
a

Aaron

02/27/2023, 9:20 PM
Assuming you’re using the default WireMock docker setup from here
docker run -it --rm \
  -p 8080:8080 \
  --name wiremock \
  wiremock/wiremock:2.35.0
You can just modify that
-p
value to a new port
docker run -it --rm \
  -p 8089:8089 \
  --name wiremock \
  wiremock/wiremock:2.35.0
s

Sanjay Adhikari

02/27/2023, 9:22 PM
I am not, I am building a new image out of standard image using a dockerfile, something like this:
And then deploy it on kubernetes as a sidecar to my application container.
a

Aaron

02/27/2023, 9:23 PM
How does your docker container start WireMock?
s

Sanjay Adhikari

02/27/2023, 9:24 PM
I do not provide any explicit command, so I am assuming that must be there in the base dockerfile ?