Skip to content

Instantly share code, notes, and snippets.

@whateverforever
Created September 4, 2023 09:34
Show Gist options
  • Save whateverforever/53efa2a76e7772da0693e734e4307fa2 to your computer and use it in GitHub Desktop.
Save whateverforever/53efa2a76e7772da0693e734e4307fa2 to your computer and use it in GitHub Desktop.
xvfb-run and docker or kubernetes

If your docker container hangs, or complains that no display is available, even though you have an xvfb-run entrypoint, you probably need a custom init handler:

# use custom init handler so that xvfb-run is executed properly
# alternatively use docker --init, but that doesnt work in k8s
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini

ENTRYPOINT ["/tini", "--", "xvfb-run"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment