Search code examples
amazon-web-servicesdockerauthenticationamazon-iamamazon-ecs

How to authenticate docker client commands in AWS?


Below authentication can be implemented using certificates(client & server), for any human user using docker client that talks to docker daemon:

enter image description here

But, jenkins pipeline also run docker commands to talk to docker daemon.

How to authenticate jenkins pipeline to run specific docker commands? where this pipeline is launched as jenkins slave container in AWS EC2 on every new commit in Git..... Does ECS cluster approach in launching pipeline task help in authentication?


Solution

  • You can run docker login from your jenkins script and store the secrets in jenkins config. You could also pre-install credentials on the machine as part of your build process. If you are talking about permissions to talk to the daemon, you have to give the jenkins user the appropriate permissions (usually add it to the docker group`