Dockerfile 600 B

123456789101112
  1. ARG BUILD_FROM=public.ecr.aws/docker/library/postgres:13
  2. FROM ${BUILD_FROM}
  3. ARG POSTGRES_USER=postgres
  4. COPY --chown=$POSTGRES_USER ./pgsql/pg_hba_tls.conf /var/lib/postgresql/pg_hba.conf
  5. COPY --chown=$POSTGRES_USER certs/server.key /var/lib/postgresql/server.key
  6. COPY --chown=$POSTGRES_USER certs/server.crt /var/lib/postgresql/server.crt
  7. COPY --chown=$POSTGRES_USER certs/ca.crt /var/lib/postgresql/root.crt
  8. RUN chmod 600 /var/lib/postgresql/pg_hba.conf
  9. RUN chmod 600 /var/lib/postgresql/server.key
  10. RUN chmod 600 /var/lib/postgresql/server.crt
  11. RUN chmod 600 /var/lib/postgresql/root.crt
  12. EXPOSE 5432