Connecting to Amazon DocumentDB with RDS CA from a dockerized Java.
- Configure your cluster host, user, password, database, and collection in Main.java
- Build a fat jar (see build.gradle)
./gradlew clean jar
- Build docker image (see Dockerfile)
docker build --tag my-prj/service:0.0.0-local --build-arg trustStorePassword=somePassword .
This bakes a trust store with RDS CA certificate inside the image using import_rds_certs.sh
- Run the image
docker run abcdef12345
- This should output the number of entries in your collection.