不知道为什么,但在安装我的钥匙时....它们在容器中看起来与本地主机不同。
Joshuas-MBP:quikorderboot joshuacalloway$ docker -v
Docker version 1.10.3, build 20f81dd
Joshuas-MBP:quikorderboot joshuacalloway$ docker run -v ~/.aws:/root/.aws -it --entrypoint=sh quikorderboot
/app # cat ~/.aws/credentials
[quikorder]
aws_access_key_id = ~NKYQ
aws_secret_access_key = ~gqr24WaP6m
/app # exit
Joshuas-MBP:quikorderboot joshuacalloway$ cat ~/.aws/credentials
[quikorder]
aws_access_key_id = ~WJSQ
aws_secret_access_key = ~CS+XewIssfl
答案 0 :(得分:0)
取决于:
~/.aws
中用-v ~/.aws:/root/.aws
表示的路径:尝试完整的显式路径(/home/...
或/Users/...
),知道如果您不在Linux中(但正在使用Windows或Mac上的泊坞窗),只有C:\Users
或/Users
已安装并显示在(已创建的泊坞机)boot2docker
虚拟机中。root
,而是joshuacalloway
:因此~/.aws/credentials
是< em> not /root/.aws/credential
。注意:通常会传递凭据凭据through environment variables
docker run -d \
-e APP_CONFIG=application.config.example \
-e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
-p 8080:5000 \
eb-py-sample