I'm trying to containerize a Node application that creates snapshots of .STL files. This application is started through xvfb-run
to provide it a mock GUI in which it can generate said snapshots, and it works if I just run the application without a container, but when I try to containerize it, xvfb-run
simply hangs. Nothing is printed in the container console, there are no logs, and adding -e /dev/stdout
to xvfb-run
doesn't output anything.
This is my dockerfile:
FROM debian:latest AS build-env
WORKDIR /app
COPY src ./src
COPY tsconfig.json ./
COPY package.json ./
RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -my wget gnupg
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN apt-get install -y nodejs build-essential libxi-dev xvfb libgl1-mesa-dev libglu1-mesa-dev libglew-dev
RUN npm install .
RUN npm install -g typescript
RUN tsc
EXPOSE 3000
CMD ["xvfb-run", "node", "dist/examples/server.js"]
Example run (the cursor hangs there forever, nothing is ever printed)
Edit: Just wanted to clarify that it IS supposed to print something - the Express server prints something when it starts, so I can tell it's not starting and something is wrong. I can also confirm that the xvfb-run
command is present, as running it without any other arguments displays a help message.
init: true
do not help for me) β Verditer