我需要使用firefox运行XVFB和docker,但无法让它们一起工作
这是我的Dockerfile:
FROM abevoelker/ruby:latest # based on ubuntu
ENV TERM linux
RUN apt-get update && apt-get install -y .....
ENV DISPLAY :99
# Install Xvfb init script
ADD xvfb_init /etc/init.d/xvfb # default xvfb init.d
RUN chmod a+x /etc/init.d/xvfb
CMD ["firefox"]
Run Code Online (Sandbox Code Playgroud)
我从Firefox获得的错误消息是
Error: cannot open display: :99
Run Code Online (Sandbox Code Playgroud) 随着ruby on rails,我想做的事情如下:
@tasks = Task.where(:def => true || :house_id => current_user.house_id)
Run Code Online (Sandbox Code Playgroud)
最有效/干净的方法是什么?