Closed jakub-bochenski closed 4 months ago
I think this could be solved if there were 2 repositories inside the docker image:
I think I could simulate this by doing sth like:
docker run --rm \
-e "STUBRUNNER_IDS=foo.bar:baz:+:stubs:9876" \
-e "STUBRUNNER_REPOSITORY_ROOT=file:///home/scc/contracts-repository" \
-e "STUBRUNNER_STUBS_MODE=REMOTE" \
-v '${HOME}/.m2/:/home/scc/contracts-repository:ro'
-p "8083:8083" \
-p "9876:9876" springcloud/spring-cloud-contract-stub-runner:4.1.1
but having a built in option for that would be nice.
Above workaround will not work if you need to use a remote repository too :(
Why can't you just mount it in a read write mode? Ah, now I see, we mention this in the docs. Let me fix it
Would still be nice to mount the repository in :ro mode for security
Describe the bug Per https://docs.spring.io/spring-cloud-contract/docs/current/reference/html/docker-project.html#docker-stubrunner
However doing that with an empty repository prevents the runner from starting, as it's trying to write there
Sample