如何在gitlab-ci工作中使用docker?

时间:2016-12-05 20:41:46

标签: docker gitlab gitlab-ci gitlab-ci-runner

我希望能够使用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

0 个答案:

没有答案