From f51befaabf8127e1b24b3f7173d167b90b478e76 Mon Sep 17 00:00:00 2001 From: Gregory Bell Date: Wed, 3 Jul 2024 17:07:59 -0600 Subject: [PATCH] Use entrypoint script --- Dockerfile | 3 ++- entrypoint.sh | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 entrypoint.sh 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