任务image_resource
属性is marked as optional in the documentation,但没有它GNU / Linux任务失败。
此外,type
的image_resource
财产的文件说:
需要。资源的类型。通常
docker-image
但我找不到有关其他支持类型的任何信息。
如何在没有任何容器技术的情况下在底层系统上运行任务,比如我的Windows和macOS工作者?
在Concourse中,你真的不应该在Docker之外做任何事情。这是主要特征之一。 Concourse在Docker容器中运行,并为每个构建启动新容器。如果要在容器中的sh
或bash
中运行一个或多个Linux命令,可以尝试下面这样的任务配置。
- task: linux
config:
platform: linux
image_resource:
type: docker-image
source: {repository: ubuntu, tag: '18.04'}
run:
dir: /<path-to-dir>
path: sh
user: root
args:
- -exc
- |
echo "Running in Linux!"
ls
scp <you@your-host-machine:file> .
telnet <your-host-machine>
<whatever>
...