最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

amazon web services - AWS credentials to a Docker container via volume mount unable to read the credentials? - Stack Overflow

programmeradmin5浏览0评论

i did some research on stackoverflow, based on that . i have created a docker compose file as such

version: '3'
services:
  app:
    image: your_image
    volumes:
    - .:/app

with this , if i run my container in a interactive mode and look at the file system in my container . i see standard root directory containing essential directories like /bin, /etc, /home, /usr, /var , /root .. and /app folder where the application code is copied to .

when i login into my machine , the aws credentials are stored in ~/.aws/credentials folder, which is copied, but to make sure i explicitly mount the this folder as well => ~/.aws:/home/.aws/, and i verified the files are copied , but the login fails .

locally , when i use boto3 , it looks into the root folder and finds the login which works. but when i mount this folder to the container, it fails to find the container. I copied the .aws/credentials file with the app and root folder as well, just to test it.

what could be the possible issue ?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论