NoCredentialProviders error with awslogs logging driver in docker at mac

元气小坏坏 提交于 2021-02-07 20:52:07

问题


Hi I am trying to enable cloud watch logging in my docker container on my mac machine.
Docker version .

Version: 18.03.1-ce . API version: 1.37 .

I am getting following error every-time i start container

Error response from daemon: failed to initialize logging driver: NoCredentialProviders: no valid providers in chain. Deprecated.
    For verbose messaging see aws.Config.CredentialsChainVerboseErrors

I have tried following approaches:

  • Exporting AWS_ACCESS_KEY_ID (etc.) in /etc/default/docker
  • mounted ~/.aws/credentials
  • Passing aws credentials as env

But every-time i get same error.

docker run -d -p 5801:8080 --env AWS_REGION=us-west-2  -v /Users/me/.aws/credentials:/root/.aws/credentials:ro --log-driver=awslogs --log-opt awslogs-region=us-west-2 --log-opt awslogs-group=perf-log-group --log-opt awslogs-create-group=true --log-opt awslogs-stream=awslogs-ing imageId

Could you please suggest what i am missing here as if i remove log part application works fine and i am able access aws api in application.

来源:https://stackoverflow.com/questions/57142771/nocredentialproviders-error-with-awslogs-logging-driver-in-docker-at-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!