Running xvfb-run when building Docker image?

197 Views Asked by At

I have quickly found out the reason why xvfb-run is failing in my scripts: Execute xvfb-run as docker custom command. However what if I need to run xvfb-run while building an image? (use case here: installing some dependencies in wine / winetricks which require a running X server).

I understand the accepted answer but what if I don't have the liberty to issues docker run --init ? Of course, I can work around it (run Xvfb& and kill it manually afterwards) but using xvfb-run is really nice and clean so I'd like to use that if possible.

1

There are 1 best solutions below

0
Miro Kropacek On

The solution was, in retrospect, quite obvious: install tini and RUN tini -v -- xvfb-run <parameters> in Dockerfile.