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

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

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 ?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744355884a4570228.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信