-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/dockerfile' of https://github.com/craigwardman/…
…C4-Builder into merge
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |