diff --git a/Dockerfile b/Dockerfile index 5322ce4..a9cfd5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,5 +19,6 @@ RUN apt-get update && \ apt-get install -y libgbm-dev xvfb COPY --from=builder /app/dist /dist +ADD --chmod=777 entrypoint.sh /entrypoint.sh -ENTRYPOINT [ "xvfb-run", "-e", "/dev/stdout","--server-args='-screen 0 1200x800x24'", "node", "/dist/index.js"] +ENTRYPOINT /entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..5d88c3b --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 & + +export DISPLAY=:99.0 +echo $@ +node /dist/index.js $@ \ No newline at end of file