热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

gitlab-runnerlocal-没有这样的命令

如何解决《gitlab-runnerlocal-没有这样的命令》经验,为你挑选了1个好方法。

我在本地安装了gitlab-runner.

km@Karls-MBP ~ $ gitlab-runner --version
Version:      10.4.0
Git revision: 857480b6
Git branch:   10-4-stable
GO version:   go1.8.5
Built:        Mon, 22 Jan 2018 09:47:12 +0000
OS/Arch:      darwin/amd64

泊坞窗:

km@Karls-MBP ~ $ docker --version
Docker version 17.12.0-ce, build c97c6d6

.gitlab-ci.yml:

image: docker/compose:1.19.0

before_script:
  - echo wtf

test:
  script:
    - echo test

结果:

km@Karls-MBP ~ $ sudo gitlab-runner exec docker --docker-privileged test
WARNING: Since GitLab Runner 10.0 this command is marked as DEPRECATED and will be removed in one of upcoming releases 
WARNING: You most probably have uncommitted changes. 
WARNING: These changes will not be tested.         
Running with gitlab-runner 10.4.0 (857480b6)
  on  ()
Using Docker executor with image docker/compose:1.19.0 ...
Using docker image sha256:be4b46f2adbc8534c7f6738279ebedd6106969695f5e596079e89e815d375d9c for predefined container...
Pulling docker image docker/compose:1.19.0 ...
Using docker image docker/compose:1.19.0 ID=sha256:e06b58ce9de2ea3f11634e022ec814984601ea3a5180440c2c28d9217b713b30 for build container...
Running on runner--project-0-concurrent-0 via x.x.x...
Cloning repository...
Cloning into '/builds/project-0'...
done.
Checking out b5a262c9 as km/ref...
Skipping Git submodules setup
No such command: sh

Commands:
  build              Build or rebuild services
  bundle             Generate a Docker bundle from the Compose file
  config             Validate and view the Compose file
  create             Create services
  down               Stop and remove containers, networks, images, and volumes
  events             Receive real time events from containers
  exec               Execute a command in a running container
  help               Get help on a command
  images             List images
  kill               Kill containers
  logs               View output from containers
  pause              Pause services
  port               Print the public port for a port binding
  ps                 List containers
  pull               Pull service images
  push               Push service images
  restart            Restart services
  rm                 Remove stopped containers
  run                Run a one-off command
  scale              Set number of containers for a service
  start              Start services
  stop               Stop services
  top                Display the running processes
  unpause            Unpause services
  up                 Create and start containers
  version            Show the Docker-Compose version information

真的不知道问题是什么.



1> 小智..:

似乎docker/compose图像配置docker-compose为入口点.

您可以覆盖.gitlab-ci.yml文件中docker/compose图像的默认入口点:

image: 
  name: docker/compose:1.19.0
  entrypoint: [""]

before_script:
  - echo wtf

test:
  script:
    - echo test


推荐阅读
author-avatar
手机用户2502928053
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有