指定 rancher-compose.yml 文件,与为 docker-compose 所做的一样

Specify rancher-compose.yml file same as it's done for docker-compose

可以为 rancher-compose up 命令指定一个 rancher-compose.yml 文件,与 docker-compose -f custom.yml

相同
$ rancher-compose up --help
Usage: rancher-compose up [OPTIONS]

Bring all services up

Options:
   --pull, -p                         Before doing the upgrade do an image pull on all hosts that have the image already
   -d                                 Do not block and log
   --upgrade, -u, --recreate          Upgrade if service has changed
   --force-upgrade, --force-recreate  Upgrade regardless if service has changed
   --confirm-upgrade, -c              Confirm that the upgrade was success and delete old containers
   --rollback, -r                     Rollback to the previous deployed version
   --batch-size value                 Number of containers to upgrade at once (default: 2)
   --interval value                   Update interval in milliseconds (default: 1000)

我认为这不可能,但也许有办法

rancher-compose -f 选项可用。

检查 this

我什至在 1.x 旧版 rancher 中看到它 available

注意:我猜 -f 选项不适用于 rancher-compose up 而只是 rancher-compose 命令。但最终结果是一样的,因为它允许有备用的撰写文件。