我需要在我的弹性 beanstalk 部署上安装 firefox。如何使用 ebextions 配置安装 firefox?
我必须使用 Xvfb 运行 headless firefox 才能从 URL 生成屏幕截图。
最佳答案
您可以使用 lambda-linux 创建的包。设置将如下所示:
.ebextensions/firefox.config:
files:
"/opt/elasticbeanstalk/bin/setup_firefox.sh":
mode: "000755"
content: |
#!/bin/bash
curl -X GET -o RPM-GPG-KEY-lambda-epll https://lambda-linux.io/RPM-GPG-KEY-lambda-epll
sudo rpm --import RPM-GPG-KEY-lambda-epll
curl -X GET -o epll-release-2015.09-1.1.ll1.noarch.rpm https://lambda-linux.io/epll-release-2015.09-1.1.ll1.noarch.rpm
sudo yum -y install epll-release-2015.09-1.1.ll1.noarch.rpm
sudo yum --enablerepo=epll install firefox-compat
commands:
set_firefox:
test: test ! -f /opt/elasticbeanstalk/.post-provisioning-complete
command: /opt/elasticbeanstalk/bin/setup_firefox.sh
.ebextensions/99_finalize_setup.config:
commands:
99_write_post_provisioning_complete_file:
command: touch /opt/elasticbeanstalk/.post-provisioning-complete
关于firefox - 使用ebextensions配置在弹性beanstalk上安装firefox?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34176045/