title: How to persist data in a dockerized DynamoDB using volumes
body: <p>My docker compose file has two containers and looks like this</p>
  
  <pre><code>  version: '3'
  
    services:
       dynamodb:
         image: amazon/dynamodb-local
         ports: 
           - '8000:8000'
         networks:
           - testnetwork
  
       audit-server:
           image: audit-dynamo
           environment:
           DYNAMO_URL: 'http://0.0.0.0:8000'
           command: node app.js
           ports: 
             - '3000:3000'
           depends_on: 
             - dynamodb
           # restart: always
  
           networks:
             - testnetwork
  
    networks:
      testnetwork:
  </code></pre>
  
  <p>My goal is to mount local data to some volume. currently losing data on <code>docker-compose down</code> </p>