运行时docker:dind
我不能使用docker login
命令和任何其他 docker 命令。
我的用例是我有一个 Nexus Docker Registry,我正在尝试通过 GitLab CI 连接到这个注册表。
docker run --rm -it docker:stable-dind docker login -u user -p password https://registry.mine.io
给:
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?