forked from source-foundry/Hack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
77 lines (49 loc) · 1.79 KB
/
Dockerfile
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
73
74
75
76
77
# -=< Create Base Image >=-
# Start with a very simple Alpine Linux
FROM alpine
# -=< Install Required Packages >=-
# We can't install packages without running update first
RUN apk update
# Install tools we need to build dependencies later on
RUN apk add gcc g++ make patch python3 py3-pip python3-dev
# Symlink python3 to python
RUN ln -s /usr/bin/python3 /usr/bin/python
# Install tools we need to download dependencies
RUN apk add curl git
# Install libraries dependencies require
RUN apk add zlib-dev libxml2-dev libxslt-dev
# -=< Add Files >=-
# Copy the build files to the image
COPY Makefile /hack/
COPY build-subsets.sh /hack/
COPY build-ttf.sh /hack/
COPY build-woff.sh /hack/
COPY build-woff2.sh /hack/
# Copy the build folders to the image
COPY config /hack/config/
COPY postbuild_processing /hack/postbuild_processing/
COPY source /hack/source/
COPY tools /hack/tools/
# -=< Patch Alpine Linux >=-
# Copy the patch file to the image
COPY docker /hack/docker/
# We need to patch stdbool.h as C++ doesn't actually know _Bool data type
# but building ttfautohint requires the _Bool data type even in C++ files.
RUN patch /usr/include/stdbool.h /hack/docker/stdbool.h.patch
# -=< Install the actual dependencies >=-
WORKDIR /hack
RUN ./build-ttf.sh --install-dependencies-only
RUN ./build-woff.sh --install-dependencies-only
RUN ./build-woff2.sh --install-dependencies-only
# -=< Install Optional Packages >=-
# Install bash as some extra tools need it
RUN apk add bash
# Install tools we need to create archives
RUN apk add zip xz
# Install a simple to use editor as vi just sucks for most people
RUN apk add nano
# -=< Add Optional Files >=-
# Copy the alt modification files to the image
COPY alt-hack /hack/alt-hack/
# Copy alt modificaton script to the image
COPY create-alt-hack.sh /hack/