本文介绍了Gitlab CI-泊坞窗:找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在gitlab ci管道中构建我的docker映像。
I am trying to build my docker image within the gitlab ci pipeline.
但是它找不到docker命令。
However it is not able to find the docker command.
.gitlab-ci.yml
stages:
- quality
- test
- build
- deploy
image: node:8.11.3
services:
- mongo
- docker:dind
before_script:
- npm install
quality:
stage: quality
script:
- npm run-script lint
test:
stage: test
script:
- npm run-script test
build:
stage: build
script:
- docker build -t server .
deploy:
stage: deploy
script:
- echo "TODO deploy push docker image"
推荐答案
您需要选择包含docker binaries的映像
you need to choose an image including docker binaries
image: gitlab/dind
services:
- docker:dind
这篇关于Gitlab CI-泊坞窗:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!