我希望能够使用nodejs镜像,然后在同一作业中执行docker命令。我的gitlab-ci.yml:
image: docker:latest
services:
- docker:dind
stages:
- publish
before_script:
- docker login -p $PW -u $USERNAME private-repo
release-docker:
image: node:6.9.1
stage: publish
only:
- master
script:
- npm install
- docker build -t image-name .
- other commands..
虽然我定义了泊坞窗服务,但我收到以下错误:
$ docker info
/bin/bash: line 47: docker: command not found
ERROR: Build failed: exit code 1