Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile for creating c4builder docker image #51

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM openjdk:11
RUN curl -fsSL https://deb.nodesource.com/setup_17.x | bash -
RUN apt-get update && apt-get install -y nodejs graphviz chromium xvfb

RUN npm i -g c4builder

RUN useradd defaultuser -u 1000 -s /bin/bash -d /home/defaultuser -m \
&& echo 'exec chromium $@ --no-sandbox --disable-setuid-sandbox' > /usr/bin/chromium.sh \
&& chmod a=xr /usr/bin/chromium.sh

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium.sh

USER defaultuser
VOLUME /pwd
CMD /bin/bash -c "echo Scanning for all .c4builder files in volume 'pwd' && \
Xvfb :99 -ac -screen 0 1280x720x16 -nolisten tcp -nolisten unix & disown $! && \
export DISPLAY=:99 && \
cd /pwd && \
find -name .c4builder -execdir c4builder \; \
&& echo FINISHED"