-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Expand file tree
/
Copy pathDockerfile
More file actions
72 lines (67 loc) · 1.75 KB
/
Dockerfile
File metadata and controls
72 lines (67 loc) · 1.75 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM alpine:latest
LABEL org.opencontainers.image.title="Nerd Fonts Patcher" \
org.opencontainers.image.description="Patches developer targeted fonts with a high number of glyphs (icons)." \
org.opencontainers.image.url="https://www.nerdfonts.com/" \
org.opencontainers.image.source="https://github.com/ryanoasis/nerd-fonts" \
org.opencontainers.image.licenses="MIT"
RUN <<ENDOFRUN
apk update
apk upgrade
echo "Add build dependencies"
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/latest-stable/community \
alpine-sdk \
cmake \
coreutils \
freetype-dev \
gettext-dev \
harfbuzz-dev \
libxml2-dev \
ninja \
python3-dev \
woff2-dev
echo "Add execute dependencies"
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/latest-stable/community \
freetype \
harfbuzz \
libxml2 \
python3 \
woff2
echo "Fetch and build fontforge"
git clone https://github.com/fontforge/fontforge.git
cd fontforge
git checkout 3a960a4d83c65b8ff5fc0bab8b1f19964aa023df
mkdir build
cd build
cmake -GNinja \
-DENABLE_GUI=off \
-DENABLE_DOCS=off \
-DENABLE_NATIVE_SCRIPTING=off \
-DENABLE_LIBSPIRO=off \
-DENABLE_PYTHON_EXTENSION=off \
..
ninja
cmake --install . --strip
cd ../..
rm -rf fontforge
rm -rf /usr/local/share
echo "Remove build dependencies"
apk del --rdepends \
alpine-sdk \
cmake \
coreutils \
freetype-dev \
gettext-dev \
harfbuzz-dev \
libxml2-dev \
ninja \
python3-dev \
tiff-dev \
woff2-dev
echo "Add additional runtime dependencies"
apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/latest-stable/community \
parallel
ENDOFRUN
ENV PYTHONIOENCODING=utf-8
VOLUME /in /out
COPY . /nerd
ENTRYPOINT [ "/bin/sh", "/nerd/bin/scripts/docker-entrypoint.sh" ]