-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
103 lines (97 loc) · 2.58 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "haxe update.hxml"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM buildpack-deps:bookworm-scm
# ensure local haxe is preferred over distribution haxe
ENV PATH /usr/local/bin:$PATH
# runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
libgc1 \
zlib1g \
libpcre2-8-0 \
libpcre3 \
libmariadb3 \
libsqlite3-0 \
libmbedcrypto7 \
libmbedtls14 \
libmbedx509-1 \
&& rm -rf /var/lib/apt/lists/*
# install neko, which is a dependency of haxelib
ENV NEKO_VERSION 2.4.0
RUN set -ex \
&& buildDeps=' \
gcc \
make \
cmake \
libgc-dev \
libssl-dev \
libpcre2-dev \
zlib1g-dev \
apache2-dev \
libmariadb-dev-compat \
libsqlite3-dev \
libmbedtls-dev \
libgtk-3-dev \
' \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
\
&& wget -O neko.tar.gz "https://github.com/HaxeFoundation/neko/archive/v2-4-0/neko-2.4.0.tar.gz" \
&& echo "232d030ce27ce648f3b3dd11e39dca0a609347336b439a4a59e9a5c0a465ce15 *neko.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/src/neko \
&& tar -xC /usr/src/neko --strip-components=1 -f neko.tar.gz \
&& rm neko.tar.gz \
&& cd /usr/src/neko \
&& cmake -DRELOCATABLE=OFF . \
&& make \
&& make install \
\
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /usr/src/neko ~/.cache
# install haxe
ENV HAXE_VERSION 4.2.5
ENV HAXE_STD_PATH /usr/local/share/haxe/std
RUN set -ex \
&& buildDeps=' \
make \
ocaml-nox \
ocaml-native-compilers \
camlp4 \
ocaml-findlib \
zlib1g-dev \
libpcre3-dev \
libmbedtls-dev \
libxml-light-ocaml-dev \
opam \
mccs \
m4 \
unzip \
pkg-config \
libstring-shellquote-perl \
libipc-system-simple-perl \
' \
&& git clone --recursive --depth 1 --branch 4.2.5 "https://github.com/HaxeFoundation/haxe.git" /usr/src/haxe \
&& cd /usr/src/haxe \
&& mkdir -p $HAXE_STD_PATH \
&& cp -r std/* $HAXE_STD_PATH \
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
\
&& opam init --disable-sandboxing \
&& eval `opam env` \
\
&& opam pin add extlib 1.7.9 --no-action \
\
&& ( [ -f /usr/src/haxe/opam ] || [ -f /usr/src/haxe/haxe.opam ] && opam install /usr/src/haxe --deps-only --assume-depexts --yes || make opam_install ) \
&& make all tools \
&& mkdir -p /usr/local/bin \
&& cp haxe haxelib /usr/local/bin \
&& mkdir -p /haxelib \
&& cd / && haxelib setup /haxelib \
\
&& eval `opam env --revert` \
&& rm -rf ~/.opam \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /usr/src/haxe ~/.cache
CMD ["haxe"]