-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (26 loc) · 786 Bytes
/
Dockerfile
File metadata and controls
30 lines (26 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM docker.io/openscad/openscad:dev
# 1. Install System Dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-fonttools \
fontconfig \
xvfb \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN echo '#!/bin/bash\n\
set -e\n\
\n\
echo "--- Checking for fonts in /app ---"\n\
if ls /app/*.ttf 1> /dev/null 2>&1; then cp /app/*.ttf /usr/share/fonts/; fi\n\
if ls /app/*.otf 1> /dev/null 2>&1; then cp /app/*.otf /usr/share/fonts/; fi\n\
\n\
echo "--- Rebuilding Font Cache ---"\n\
fc-cache -f -v\n\
\n\
echo "--- Running Stamp Generator ---"\n\
xvfb-run -a python3 font_to_stl.py\n\
\n\
echo "--- Done! Exiting container. ---"\n\
' > /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]