![](/img/trans.png)
[英]How do I run the linux based docker container with tcsh as the shell instead of Bash?
[英]How do I run Linux tasks without Docker (on the underlying system)?
任务的image_resource
属性在文档中被标记为可选 ,但是如果没有它,GNU / Linux任务将失败。
另外, image_resource
的type
属性的文档说:
需要。 资源的类型。 通常是
docker-image
但是我找不到有关其他受支持类型的任何信息。
我如何在没有任何容器技术的情况下在底层系统上运行任务,例如在Windows和macOS worker中?
在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>
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.