How pass an X509 cert to Dockerized app to access MongoDB Atlas

I have a Dockerized app that connects to my MongoDB Atlas cluster. Now, I’m trying to configure this with an X509 cert.

The URI can contain a reference to a file, but I’ve not seen a good Dockerfile example to pass said file to the container. It is my understanding that using CP in the Dockerfile would be insecure.

Can someone point me to a demo/example of how to properly get an X509 cert to a Docker instance for use in connection to Atlas? I’ve seen a suggestion to Base64 encode the file and then pass it as an ARG. Will this work in a NodeJS Mongo connection URI?