如何在AWS中对Docker客户端命令进行身份验证? [英] How to authenticate docker client commands in AWS?

查看:179
本文介绍了如何在AWS中对Docker客户端命令进行身份验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于使用与docker守护进程对话的docker客户端的任何人类用户,可以使用证书(客户端和服务器)来实现以下身份验证:

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

但是,jenkins管道还运行docker命令来与docker守护进程通信.

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

如何对jenkins管道进行身份验证以运行特定的docker命令?哪里在Git中的每个新提交上将此管道作为AWS EC2中的詹金斯从属容器启动.....启动管道任务的ECS集群方法是否有助于身份验证?

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?

推荐答案

您可以从jenkins脚本运行docker login,并将机密存储在jenkins配置中.您还可以在构建过程中在计算机上预安装凭据.如果您正在谈论与守护程序对话的权限,则必须给jenkins用户适当的权限(通常将其添加到docker组`

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`

这篇关于如何在AWS中对Docker客户端命令进行身份验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆