Skip to content

Instantly share code, notes, and snippets.

@tommynyquist
Created October 14, 2015 21:29
Show Gist options
  • Save tommynyquist/11321acb1f59bde080a7 to your computer and use it in GitHub Desktop.
Save tommynyquist/11321acb1f59bde080a7 to your computer and use it in GitHub Desktop.
### Dockerfile
FROM ubuntu
RUN apt-get update && apt-get install -yq xvfb
ADD xvfb-run-wrapper.sh /bin/xvfb-run-wrapper.sh
RUN chmod +x /bin/xvfb-run-wrapper.sh
ENTRYPOINT ["/bin/xvfb-run-wrapper.sh", "/bin/sleep"]
CMD ["10000"]
###
### xvfb-run-wrapper.sh
#!/bin/sh
(
/usr/bin/xvfb-run -a $@
)
###
$ docker run dockersleep
$ docker run dockersleep 50
@Gvozd
Copy link

Gvozd commented Dec 26, 2018

I remake this gist without intermediate xvfb-run-wrapper.sh

ENTRYPOINT ["/bin/sh", "-c", "/usr/bin/xvfb-run -a $@", ""]
CMD ["/bin/sleep", "10000"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment