Hello! I try to start wiremock in docker with all...
# help
х
Hello! I try to start wiremock in docker with allowed https requests, bud it doesn't work. I tried to search examples and send my question to chatgpt or copilot. I had an example Dockerfile
Copy code
FROM wiremock/wiremock:latest

RUN apt-get update && apt-get install -y openssl

RUN keytool -genkey -alias wiremock -keyalg RSA -keysize 2048 \
      -validity 365 -keypass password -storepass password \
      -keystore identity.jks \
      -dname "CN=localhost, OU=IT, O=MyCompany, L=City, ST=State, C=US"

RUN openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost"

RUN  openssl pkcs12 -export -out identity.p12 -inkey key.pem -in cert.pem -password pass:password

ENTRYPOINT ["/docker-entrypoint.sh"]
Copy code
#!/bin/sh
set -e

exec java -jar /wiremock/wiremock-standalone.jar --https-port 8443 --https-keystore /wiremock/identity.jks --https-keystore-password password
Bud requests https://localhost:8443/__admin/mappings doesn't work I received the response Error: SSL connect error Maybe someone knows how this problem with https request resolved