-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
95 lines (89 loc) · 2.37 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
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "haxe update.hxml"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM alpine:3.18
# ensure local haxe is preferred over distribution haxe
ENV PATH /usr/local/bin:$PATH
# install ca-certificates so that HTTPS works consistently
# the other runtime dependencies are installed later
RUN apk add --no-cache ca-certificates
ENV NEKO_VERSION 2.4.0
ENV HAXE_VERSION 4.1.5
ENV HAXE_STD_PATH /usr/local/share/haxe/std
RUN set -ex \
&& apk add --no-cache --virtual .fetch-deps \
tar \
git \
\
&& 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 \
&& apk add --no-cache --virtual .neko-build-deps \
apache2-dev \
cmake \
gc-dev \
gcc \
gtk+3.0-dev \
libc-dev \
linux-headers \
pcre2-dev \
mariadb-dev \
mbedtls-dev \
ninja \
sqlite-dev \
&& cd /usr/src/neko \
&& cmake -GNinja -DNEKO_JIT_DISABLE=ON -DRELOCATABLE=OFF -DRUN_LDCONFIG=OFF . \
&& ninja \
&& ninja install \
\
&& git clone --recursive --depth 1 --branch 4.1.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 \
&& apk add --no-cache --virtual .haxe-build-deps \
bash \
pcre-dev \
zlib-dev \
mbedtls-dev \
make \
opam \
aspcud \
m4 \
unzip \
patch \
pkgconf \
rsync \
musl-dev \
perl-string-shellquote \
perl-ipc-system-simple \
ocaml-compiler-libs \
ocaml-ocamldoc \
&& opam init --compiler=4.11.0 --disable-sandboxing \
&& eval $(opam env) \
\
&& opam pin add extlib 1.7.7 --no-action \
\
&& opam install . --deps-only --no-depexts --yes \
&& make \
&& eval $(opam env --revert) \
&& mkdir -p /usr/local/bin \
&& cp haxe haxelib /usr/local/bin \
&& mkdir -p /haxelib \
&& cd / && haxelib setup /haxelib \
\
&& runDeps="$( \
scanelf --needed --nobanner --recursive /usr/local \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --virtual .haxe-rundeps $runDeps \
&& apk del .fetch-deps .neko-build-deps .haxe-build-deps \
&& rm -rf ~/.opam \
&& rm -rf /usr/src/neko /usr/src/haxe
CMD ["haxe"]