提供在没有任何手动确认“你确定吗”的情况下运行“./launcher cleanup”命令的能力,以便可以在Cron中调度

https://github.com/discourse/discourse_docker/blob/master/launcher#L386-L406

That can be achieved today using the yes command.

yes | ./launcher cleanup
12 个赞

我们还能让它正常工作吗?

yes | ./launcher cleanup
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] Total reclaimed space: 0B
WARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y

最后的 Y 是手动输入的,以使清理继续进行。