2024-09-27 04:24:35 发布
网友
刚启动docker conda/miniconda3-centos7,但当进入容器并安装pip install awscli后,使用默认设置aws configure无法运行aws s3 ls。在
conda/miniconda3-centos7
pip install awscli
aws configure
aws s3 ls
错误:
Unable to locate credentials. You can configure credentials by running "aws configure".
在docker运行的同一主机上-我可以运行上面的命令而没有问题。在
我建议在运行期间与容器共享主机~/.aws/config文件上的当前凭据:
~/.aws/config
docker run -it -v ~/.aws:/root/.aws conda/miniconda3-centos7 /bin/bash
# export AWS_PROFILE=<MY_PROFILE_NAME> (Optionally export the required profile (if not default)) # pip install awscli # aws s3 ls
我建议在运行期间与容器共享主机
~/.aws/config
文件上的当前凭据:docker run -it -v ~/.aws:/root/.aws conda/miniconda3-centos7 /bin/bash
相关问题 更多 >
编程相关推荐