title: Docker PostgreSQL data encryption at rest
body: <p>According to the manual, PostgreSQL supports '<a href="https://www.postgresql.org/docs/12/encryption-options.html" rel="noreferrer">Data Partition Encryption</a>' in order to store the data encrypted at rest on the system. </p>
  
  <p>For my next application I want to containerize PostgreSQL using Docker. Unfortunately I have not found any option, to encrypt the database files within this Docker container to protect the data. I thought about something like entering a password when the container is starting to decrypt all the needed files at runtime. </p>
  
  <p>Has anyone experience with this?</p>