我用分子来测试我的角色。我使用一个.gitlab-ci.yml文件来执行一个管道,在该管道中调用分子来测试角色。管道配置为码头工人。
---
image: docker:latest
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
stages:
- test
<snip>该管道实际上运行没有任何错误,我的角色是完美的测试,这是很好的。
问题:管道的输出中显示了反对意见警告:
2021-12-27T20:54:55.033126585Z time="2021-12-27T20:54:55.032781033Z" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
2021-12-27T20:54:55.035055413Z time="2021-12-27T20:54:55.032907524Z" level=warning msg="Binding to IP address without --tlsverify is insecure and gives root access on this machine to everyone who has access to your network." host="tcp://0.0.0.0:2375"
2021-12-27T20:54:55.035076321Z time="2021-12-27T20:54:55.034207001Z" level=warning msg="Binding to an IP address, even on localhost, can also give access to scripts run in a browser. Be safe out there!" host="tcp://0.0.0.0:2375"
2021-12-27T20:54:56.034494370Z time="2021-12-27T20:54:56.034363786Z" level=warning msg="Binding to an IP address without --tlsverify is deprecated. Startup is intentionally being slowed down to show this message" host="tcp://0.0.0.0:2375"
2021-12-27T20:54:56.034595755Z time="2021-12-27T20:54:56.034566557Z" level=warning msg="Please consider generating tls certificates with client validation to prevent exposing unauthenticated root access to your network" host="tcp://0.0.0.0:2375"
2021-12-27T20:54:56.034665726Z time="2021-12-27T20:54:56.034638945Z" level=warning msg="You can override this by explicitly specifying '--tls=false' or '--tlsverify=false'" host="tcp://0.0.0.0:2375"
2021-12-27T20:54:56.034732887Z time="2021-12-27T20:54:56.034688345Z" level=warning msg="Support for listening on TCP without authentication or explicit intent to run without authentication will be removed in the next release" host="tcp://0.0.0.0:2375"
2021-12-27T20:55:11.036193082Z tim当我读到这篇文章时,看上去很严肃。
容器是在gitlab.com本身执行的,我使用共享运行程序。我所有的角色都是为了开发目的,所以我并不在乎是否有人能读懂它们。无论哪种方式,它们都是开源的。没有存储生产数据或敏感信息。
问题:我如何配置管道,以便折旧警告要么得到解决,要么被忽略。
我试着配置了这样的东西:
variables:
DOCKER_TLSVERIFY: false但警告依然存在。
奖金:我该如何修复:could not change group /var/run/docker.sock to docker: group docker not found
发布于 2021-12-28 16:28:11
我想明白了,我必须设置以下变量:
variables:
# DOCKER_HOST: tcp://docker:2375/ # not used anymore
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"https://stackoverflow.com/questions/70500564
复制相似问题