https://linen.dev logo
#general
Title
# general
s

Sadineni Vivek

02/27/2024, 1:01 PM
I am using standalone jar for running wiremock. Now i want to enable https calls to my wiremock server. How can i do it??
t

Tom

02/27/2024, 1:05 PM
You can do this by setting the HTTPS port. Via the CLI this is something like
--https-port=8443
s

Sadineni Vivek

02/27/2024, 2:20 PM
does this mean that for enabling https requests, i should eexpose 8443..?
Im deploying a docker container in gke using this command and using the wiremock to stub my apis
Copy code
ENTRYPOINT exec java $JAVA_OPTS -cp wiremock-standalone.jar:wiremock-grpc-extension-standalone.jar wiremock.Run --port 8080 --root-dir wiremock-data
t

Tom

02/27/2024, 2:24 PM
If you want the HTTPS port to be accessible outside the Docker network, yes you’ll need to expose 8443 (assuming you’ve also added
--https-port=8443
)
s

Sadineni Vivek

02/28/2024, 7:39 AM
is it 8443 or 443??
t

Tom

02/28/2024, 9:30 AM
You can pick whatever port you wish above 1024 (since WireMock runs as non-root). Doesn’t have to be the same port number you expose though - that can be 443 provided your Docker setup permits it.
33 Views