I want to leverage Github Action’s
service and use it to create a mongo instance with replica set support. This is what I have right now.
mongo: image: mongo:5.0.3 volumes: - /d/test-db.d ports: - 27017:27017 options: >- --entrypoint /usr/bin/docker run --name mongo_container --replSet test --bind_ip_all --health-cmd "bash -c \"if [ $(mongo mongo_container --quiet --eval 'rs.initiate().ok || rs.status().ok') -eq 1 ]; then exit 1; else exit 0; fi\"" --health-interval 10s --health-timeout 5s --health-retries 5 --name test
However, github actions gives me an error
'denied: requested access to the resource is denied' when trying to call
docker run as the entrypoint. I suppose it’s not permittable for me to directly run docker run.
I also tried setting
--replSet test and
--bind_ip_all within the options array, but it is not recognized and throws and error.
I see nothing in the documentation regarding replica sets. Are they even supported as a service?