Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DynamoDB Localを手軽に使える
公式のDockerイメージ #akibaaws / DynamoDB Local Docker Image

6e4c7cb36e31e3b871f3ae0c83ac8110?s=47 shoito
October 04, 2018

DynamoDB Localを手軽に使える
公式のDockerイメージ #akibaaws / DynamoDB Local Docker Image

AKIBA.AWS #10で「DynamoDB Localを手軽に使える
公式のDockerイメージ」というタイトルで発表しました。

6e4c7cb36e31e3b871f3ae0c83ac8110?s=128

shoito

October 04, 2018
Tweet

Transcript

  1. %ZOBNP%#-PDBMΛखܰʹ࢖͑Δ
 ެࣜͷ%PDLFSΠϝʔδ  ҏ౻঵TIPJUP ͠ΐ͍ͱ  "84ࣄۀຊ෦ϓϩμΫτάϧʔϓ ",*#""84

  2. wҏ౻঵!TIPJUP w4PGUXBSF&OHJOFFS w"84ࣄۀຊ෦
 ϓϩμΫτάϧʔϓॴଐ wத్ೖࣾ ࣗݾ঺հ

  3. ຊ೔঺հ͢ΔΞοϓσʔτ

  4. %ZOBNP%#-PDBM%PDLFSJNBHF

  5. DynamoDBͷDLՄೳόʔδϣϯ DockerΠϝʔδ ͜Ε͸Կ͔ʁ

  6. DynamoDBΛ࢖͏γεςϜͷ
 ϩʔΧϧ։ൃͱςετ Կʹ࢖͏ͷʁ

  7. ✤։ൃɾςετ࣌ͷ
 DynamoDB࢖༻ྉແྉ ✤Πϯλʔωοτ઀ଓෆཁ ࢖͏ϝϦοτ͸ʁ

  8. ੍ݶ͸Կʁ wεϧʔϓοτઃఆ͸ແࢹ͞ΕΔ wฒྻεΩϟϯͰ͖ͳ͍ wʜ ˞μ΢ϯϩʔυՄೳͳ%ZOBNP%#ͱ%ZOBNP%#΢ΣϒαʔϏεͷҧ͍ IUUQTEPDTBXTBNB[PODPNKB@KQBNB[POEZOBNPECMBUFTUEFWFMPQFSHVJEF %ZOBNP%#-PDBM6TBHF/PUFTIUNM

  9. DynamoDBͷDLՄೳόʔδϣϯ JavaͰಈ͘JARϑΝΠϧ (DynamoDBLocal.jar) %ZOBNP%#-PDBM%PDLFSJNBHF

  10. ౰࣌ͷΞοϓσʔτ

  11. ੲ͔Βఏڙ͞Ε͍ͯͨϩʔΧϧ։ൃ؀ڥ(JAR)ͷ ެࣜͷDockerΠϝʔδ͕ఏڙ͞Εͨ ࠓճͷΞοϓσʔτ

  12. Use Amazon DynamoDB Local More Easily 
 with the New

    Docker Image Posted On: Aug 22, 2018 ৽͍͠υοΧʔΠϝʔδͰ
 Amazon DynamoDBϩʔΧϧΛ͞Βʹ༰қʹ ౤ߘ೔: Aug 22, 2018 ΞοϓσʔτλΠτϧ
  13. %PDLFSίϯςφ͸Ͳ͏ͳͬͯΔʁ Dockerfile͸ݟ౰ͨΒͳ͍ docker inspectͰݟͯΈΔ $ docker inspect amazon/dynamodb-local ... "Config":

    { ... "Cmd": [ "-jar", "DynamoDBLocal.jar", "-inMemory" ], ... "Entrypoint": [ "java" ], ... $ java -jar DynamoDBLocal.jar -inMemory
  14. %PDLFS$PNQPTFʹ૊ΈࠐΉ $ docker-compose up version: “3” services: dynamodb: image: amazon/dynamodb-local

    ports: - “8000:8000” db: image: mariadb:10.3 … docker-compose.yml
  15. ͜ͷ%PDLFSΠϝʔδͰؾΛ͚ͭΔ͜ͱ σϑΥϧτ͕-inMemoryͳͷͰɺ
 ίϯςφఀࢭޙ͸σʔλ͕อଘ͞Εͳ͍ $ docker run -p 8000:8000 amazon/dynamodb-local Initializing

    DynamoDB Local with the following configuration: Port: 8000 InMemory: true DbPath: null SharedDb: false shouldDelayTransientStatuses: false CorsParams: *
  16. ͜ͷ%PDLFSΠϝʔδͰؾΛ͚ͭΔ͜ͱ σϑΥϧτ͕-inMemoryͳͷͰɺ
 ίϯςφఀࢭޙ͸σʔλ͕อଘ͞Εͳ͍ $ docker run -p 8000:8000 -v $PWD/data:/data

    
 amazon/dynamodb-local -jar DynamoDBLocal.jar 
 -dbPath /data
  17. ͜ͷ%PDLFSΠϝʔδͰؾΛ͚ͭΔ͜ͱ σϑΥϧτ͕-inMemoryͳͷͰɺ
 ίϯςφఀࢭޙ͸σʔλ͕อଘ͞Εͳ͍ version: “3” services: dynamodb: image: amazon/dynamodb-local ports:

    - “8000:8000” command: -jar DynamoDBLocal.jar -dbPath /data volumes: - $PWD/data:/data docker-compose.yml
  18. ✤DynamoDB Local(JAR)Λ
 ૊ΈࠐΜͩDockerfileͷఆٛ ✤DockerΠϝʔδͷϏϧυ/ϓογϡ Կ͸ͱ΋͋Ε

  19. ެࣜͷDockerΠϝʔδͷެ։ʹΑΓ ΦϨΦϨDockerΠϝʔδ͕ෆཁʹ Կ͸ͱ΋͋Ε

  20. None
  21. None