title: Containerizing Cordapp with Docker Image and Docker Compose
body: <p>When running Corda in docker with external Postgres DB configurations, I get insufficient privileges to access error.</p>
  <p><strong>Note:</strong>
  Corda: 4.6 Postgresql: 9.6
  Docker engine 20.10.6
  Docker-compose: docker-compose version 1.29.1, build c34c88b2</p>
  <p><strong>docker-compose.yml file:</strong></p>
  <pre><code>version: '3.3'
  
  services:
    partyadb:
      hostname: partyadb
      container_name: partyadb
      image: &quot;postgres:9.6&quot;
      environment:
        POSTGRES_PASSWORD: postgres
        POSTGRES_USER: postgres
        POSTGRES_DB: partyadb
      ports:
      - 5432
    partya:
      hostname: partya
  #    image: corda/corda-zulu-java1.8-4.7:RELEASE
      image: corda/corda-zulu-java1.8-4.6:latest
      container_name: partya
      ports:
      - 10006
      - 2223
      command: /bin/bash -c &quot;java -jar /opt/corda/bin/corda.jar run-migration-scripts -f /etc/corda/node.conf --core-schemas --app-schemas &amp;&amp; /opt/corda/bin/run-corda&quot;
      volumes:
      - ./partya/node.conf:/etc/corda/node.conf:ro
      - ./partya/certificates:/opt/corda/certificates:ro
      - ./partya/persistence.mv.db:/opt/corda/persistence/persistence.mv.db:rw
      - ./partya/persistence.trace.db:/opt/corda/persistence/persistence.trace.db:rw
  #    - ./partya/logs:/opt/corda/logs:rw
      - ./shared/additional-node-infos:/opt/corda/additional-node-infos:rw
      - ./shared/cordapps:/opt/corda/cordapps:rw
      - ./shared/drivers:/opt/corda/drivers:ro
      - ./shared/network-parameters:/opt/corda/network-parameters:rw
      environment:
      - ACCEPT_LICENSE=${ACCEPT_LICENSE}
      depends_on:
        - partyadb
  </code></pre>
  <p><strong>Error:</strong></p>
  <pre><code>[ERROR] 12:41:24+0000 [main] internal.NodeStartupLogging. - Exception during node startup. Corda started with insufficient privileges to access /opt/corda/additional-node-infos/nodeInfo-5B........................................47D
  </code></pre>