gitlab CI中的docker镜像用于创建docker镜像

时间:2019-03-12 14:56:03

标签: docker gitlab-ci docker-image

我想在Docker CI中使用“准备运行”应用程序构建docker,因此要做的是在.gitlab-ci.yml中创建以下代码:

rebuild base docker:
  stage: prepear
  image: docker
  script:
    - docker build -t base_django environment

我想使用官方docker镜像(image:docker)来完成它,当然我在目录环境中放置了Dockerfile。不幸的是,作业失败了:

Running with gitlab-runner 11.8.0 (4745a6f3)
  on docker-auto-scale 72989761
Using Docker executor with image docker ...
Pulling docker image docker ...
Using docker image sha256:639de9917ae1f2e4a586893c9a6ea3f21fd774bc4037184ecac35f3153a293b5 for docker ...
Running on runner-72989761-project-9841176-concurrent-0 via runner-72989761-srm-1552402128-c63119b1...
Cloning repository...
Cloning into '/builds/*****/*****'...
Checking out a804a12f as master...
Skipping Git submodules setup
$ docker build -t base_django environment
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
ERROR: Job failed: exit code 1

0 个答案:

没有答案