Last Updated: January 05, 2017
·
1.76K
· conornash

Make a Docker container always connect to AWS RDS Postgres PostgreSQL with SSL

Add this to your Dockerfile:

# SSL
RUN wget http://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem -O ${AIRFLOW_HOME}/rds-combined-ca-bundle.pem \
    && mv ${AIRFLOW_HOME}/rds-combined-ca-bundle.pem /usr/local/share/ca-certificates/rds-combined-ca-bundle.crt \
    && update-ca-certificates
ENV PGSSLROOTCERT /etc/ssl/certs/ca-certificates.crt
ENV PGSSLMODE verify-full