如何在主机命令行中使用 bash 的布尔 AND 运算符在容器内运行多个命令?buildah
&&
这是我的问题的一个示例,从图像开始debian
:
$ buildah pull debian:buster && container=$(buildah from debian:buster)
$ buildah run $container -- apt -y update && apt -y upgrade
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
bash: apt: command not found...
Install package 'apt' to provide command 'apt'? [N/y]
Run Code Online (Sandbox Code Playgroud)
&&
我的主机 shell 解释命令之外的布尔值 AND buildah
。我的期望是拥有布尔值的右侧并在buildah
容器内运行。
归档时间: |
|
查看次数: |
1140 次 |
最近记录: |