英文:
Minio, how to authenticate as root so we can run ci unattended docker installs
问题
我们正在团队设置中意外地在Docker-compose中运行Minio进行测试。每天有100个部署,我们需要以某种方式获取密钥/访问密钥。但是除了通过Web控制台手动操作之外,我找不到如何在使用Docker-compose启动时使用ROOT用户进行操作的方法。
似乎只有在Web控制台中创建密钥/访问密钥之后才能进行操作。
以下命令:
mc admin user add local ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY}
无法工作,因为我无法使用root用户/密码进行身份验证(嗯,我不知道如何操作),而且文档只讨论如何将访问权限设置为私有/访问密钥,但是在部署之后,我还没有任何密钥(这就是问题的要点)。
英文:
We are running Minio in an unintended Docker-compose for testing in our team setups. Means 100 deployments per day and we need to get the secret/access keys somehow. But outside manual via the web console, I cannot find how to do this using the ROOT user we sat in Docker-compose at startup.
There seems only ways to do this using secret/access AFTER you create them in the web console.
The command;
mc admin user add local ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY}
does not work because I cannot authenticate with a root user/pass (well, I don't know how to) and the docs only talk about setting your access to your private/access key, but after deployment, I don't have any yet (which is the point of the question).
答案1
得分: 1
我认为我们可以将凭据传递给docker-compose.yaml文件,以创建用户名和密码。
version: '3'
services:
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: admin
command: server --console-address ":9001" /data
volumes:
minio_storage: {}
英文:
I think we can pass the credentials to the docker-compose.yaml file to create the username and password
version: '3'
services:
minio:
image: minio/minio
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: admin
command: server --console-address ":9001" /data
volumes:
minio_storage: {}
答案2
得分: 0
通过一些奇怪的命名方式,你在Docker配置中设置的MINIO_ROOT_USER和MINIO_ROOT_PASSWORD实际上就是ACCESS KEY和SECRET。我之前没有尝试过,因为命名不同,所以我以为它们是其他的东西。
我之前尝试过这个,但是没有成功,但现在它确实可以工作。所以@siddartha部分正确,但是他没有解释它们是完全相同的东西,必须要工作。
英文:
With some type of strange naming, the settings you put inside the docker configuration MINIO_ROOT_USER & MINIO_ROOT_PASSWORD which I did, actually are the same as the ACCESS KEY and SECRET. I did not try more because of the naming that differed, so I assumed they are other things.
I did try this before but it did not work, however it does work. So @siddartha was partially right, but it did not explain that it's exactly the same thing and must work.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论