Skip to content

Commit

Permalink
run as root
Browse files Browse the repository at this point in the history
  • Loading branch information
pofider committed Mar 11, 2020
1 parent a34117a commit 4c89b07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ ENV phantom_strategy phantom-server

ENV DISPLAY :99

USER root

# startup script to launch dbus and xvfb correctly along with our app:
# - we ensure that lock files created by Xvfb server (stored at /tmp/ with file names like /tmp/.X99-lock)
# are cleanup correctly on each container run (rm -f /tmp/.X*lock),
Expand All @@ -71,4 +73,6 @@ ENV DISPLAY :99
# in case that errors from xvfb needs to be printed to stdout for debugging purposes just pass -e /dev/stdout option (xvfb-run -e /dev/stdout .......)
# the important part of this command is the -ac option in --server-args, -ac disables host-based access control mechanisms in Xvfb server,
# which prevents the connection to the Xvfb server from our app
CMD rm -f /tmp/.X*lock && rm -rfd /tmp/xvfb-run* && xvfb-run --server-num=99 --server-args='-screen 0 1024x768x24 -ac' node server.js

USER root
CMD rm -f /tmp/.X*lock && rm -rfd /tmp/xvfb-run* && xvfb-run --server-num=99 --server-args='-screen 0 1024x768x24 -ac' node server.js

0 comments on commit 4c89b07

Please sign in to comment.