问题
Below authentication can be implemented using certificates(client & server), for any human user using docker client that talks to docker daemon:
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?
回答1:
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`
来源:https://stackoverflow.com/questions/57963970/how-to-authenticate-docker-client-commands-in-aws