By hyperh4wk
The docker image is dotnet core and the posgrsql cluster is managed by digital ocean, I already got the connection from my local machine (windows) but I don’t know how to do it from the container (linux)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
What you could do here is build a new image on top of your current image add add the certificate there, for example, your Dockerfile would look something like this:
FROM ```your_current_image:latest```
COPY ./server.crt /home/```your_user```/.postgresql/server.crt
RUN chown postgres /home/```your_user```/.postgresql/server.crt
Then run docker build . and redeploy your new image.
That way our certificate would be available inside your container in your user’s home directory.
Another way to do that would be to have the certificate available on your host, create a docker volume and mount the volume to your running container.
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.