为什么我不能通过命令 .ebextensions config 导出 PATH
Why I cant export PATH by command .ebextensions config
您好,我想在 AWS ElasticBeanstalk php 7.0 环境中使用 goofys。
我创建 .ebextentions/00_install_goofy.config.
(从二进制安装 golang,因为 yum 的 golang 版本太旧了。
packages:
yum:
fuse: []
commands:
100_install_golang_01:
command: wget https\://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz
100_install_golang_02:
command: tar -C /usr/local -xzf go1.9.linux-amd64.tar.gz
100_install_golang_03:
command: export GOROOT=/usr/local/go
test: [ -z "$GOROOT" ]
100_install_golang_04:
command: export GOPATH=/home/ec2-user/go
test: [ -z "$GOPATH" ]
100_install_golang_05:
command: export PATH=$PATH\:$GOROOT/bin\:$GOPATH/bin
100_install_golang_06:
command: echo $GOPATH > gopath
但是100_install_golang_03效果不佳...
Test for Command 100_install_golang_03
[2017-09-09T14:39:52.422Z] INFO [3034] - [Application deployment app-f68c-170909_143641@1/StartupStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_1_yubion_website] : Completed activity.
[2017-09-09T14:39:52.422Z] INFO [3034] - [Application deployment app-f68c-170909_143641@1/StartupStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: [Errno 2] No such file or directory (ElasticBeanstalk::ExternalInvocationError)
我无法导出环境和路径。我可以在 .ebextensions 上设置 PATH 吗?
或者是否有更好的方法在 ElasticBeanstalk 上自动安装 goofys。
我终于找到了由 .ebextensions 运行 定义的命令,没有 EVIRONMET 值。
它在像沙箱这样的环境中工作。
所以 "export" 命令的『作用域』只有 "command" 部分。
如果要在命令中使用 PATH,则必须在每个命令中添加导出命令。
此外,如果您想在部署 eb 后使用 PATH,请参阅以下内容 link。
您好,我想在 AWS ElasticBeanstalk php 7.0 环境中使用 goofys。
我创建 .ebextentions/00_install_goofy.config.
(从二进制安装 golang,因为 yum 的 golang 版本太旧了。
packages:
yum:
fuse: []
commands:
100_install_golang_01:
command: wget https\://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz
100_install_golang_02:
command: tar -C /usr/local -xzf go1.9.linux-amd64.tar.gz
100_install_golang_03:
command: export GOROOT=/usr/local/go
test: [ -z "$GOROOT" ]
100_install_golang_04:
command: export GOPATH=/home/ec2-user/go
test: [ -z "$GOPATH" ]
100_install_golang_05:
command: export PATH=$PATH\:$GOROOT/bin\:$GOPATH/bin
100_install_golang_06:
command: echo $GOPATH > gopath
但是100_install_golang_03效果不佳...
Test for Command 100_install_golang_03
[2017-09-09T14:39:52.422Z] INFO [3034] - [Application deployment app-f68c-170909_143641@1/StartupStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_1_yubion_website] : Completed activity.
[2017-09-09T14:39:52.422Z] INFO [3034] - [Application deployment app-f68c-170909_143641@1/StartupStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: [Errno 2] No such file or directory (ElasticBeanstalk::ExternalInvocationError)
我无法导出环境和路径。我可以在 .ebextensions 上设置 PATH 吗?
或者是否有更好的方法在 ElasticBeanstalk 上自动安装 goofys。
我终于找到了由 .ebextensions 运行 定义的命令,没有 EVIRONMET 值。 它在像沙箱这样的环境中工作。
所以 "export" 命令的『作用域』只有 "command" 部分。
如果要在命令中使用 PATH,则必须在每个命令中添加导出命令。
此外,如果您想在部署 eb 后使用 PATH,请参阅以下内容 link。