2020/10/07

解決本機的 DynamoDB 寫入權限問題

## docker-compose.yml ``` version: "3" volumes: dynamodb-data: external: true services: dynamodb-local: image: amazon/dynamodb-local ports: - "8000:8000" command: ["-jar", "DynamoDBLocal.jar", "-sharedDb", "-dbPath", "./data"] volumes: - dynamodb-data:/home/dynamodblocal/data ``` ## use docker-compose ``` docker-compose up -d ``` ## login your docker container ``` docker exec -u root -t -i /bin/bash ``` ## change your docker container database file permission ``` chmod a+rw /home/dynamodblocal/data ``` refer: https://stackoverflow.com/questions/41221532/docker-volume-need-permissions-to-write-to-database

沒有留言: