我可以将 eb 扩展容器命令放在多行上吗?如果可以的话,怎么做?
Can I put a eb extension container command on multiple lines and if I can how?
我所发现的是:https://forums.aws.amazon.com/thread.jspa?threadID=112988
我知道我能做到:
container_commands:
07_run_command:
"mkdir -p /var/cache/tomcat8/temp/.m2/repository && chmod 777"
但是我可以这样做吗?
container_commands:
07_run_command:
mkdir -p /var/cache/tomcat8/temp/.m2/repository &&
chmod 777
我是否仍然需要 && 来分隔命令,或者它们是否作为单独的命令执行?还是只有一个命令?
这可以通过 YAML 的文字块标量来完成,如下所示:
container_commands:
07_run_command: |
mkdir -p /var/cache/tomcat8/temp/.m2/repository
chmod 777
可以在此处找到更多相关文档:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-commands-options
我所发现的是:https://forums.aws.amazon.com/thread.jspa?threadID=112988
我知道我能做到:
container_commands:
07_run_command:
"mkdir -p /var/cache/tomcat8/temp/.m2/repository && chmod 777"
但是我可以这样做吗?
container_commands:
07_run_command:
mkdir -p /var/cache/tomcat8/temp/.m2/repository &&
chmod 777
我是否仍然需要 && 来分隔命令,或者它们是否作为单独的命令执行?还是只有一个命令?
这可以通过 YAML 的文字块标量来完成,如下所示:
container_commands:
07_run_command: |
mkdir -p /var/cache/tomcat8/temp/.m2/repository
chmod 777
可以在此处找到更多相关文档:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-commands-options