-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (35 loc) · 1.75 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
FROM ubuntu:20.04
# the versions of the linux/haxe ecosystem to install. Update these when it's time to upgrade
# these versions must coordinate with a version available here: https://launchpad.net/~haxe/+archive/ubuntu/releases
ENV HAXE_VERSION=4.3.4
ENV DISTRO_VERSION=bpo20.04.1
ENV LIME_VERSION=8.1.2
# this env var is read by haxelib and will hopefully keep us from having to run `haxelib setup` during
# github actions
ENV HAXELIB_PATH=/var/haxelib
RUN echo "HAXELIB_PATH=${HAXELIB_PATH}" >> /etc/environment
# Haxe repositories as discussed here: https://haxe.org/download/linux/
RUN apt-get update && \
apt-get install --no-install-recommends -y software-properties-common && \
add-apt-repository ppa:haxe/releases -y
# install zip and git to be able to package the build and for getting dependencies
# install java for lime html5 builds with the `-final` flag. needed for minifying among other things
# I tried `openjdk-7-jre-headless` java version to see if our image can be made smaller, but it only saved <100MB
# which doesn't seem worth the trouble of making sure everything works
RUN apt-get install --no-install-recommends -y \
zip \
git \
default-jre \
haxe=1:${HAXE_VERSION}-1~${DISTRO_VERSION} \
&& rm -rf /var/lib/apt/lists/*
# setup haxelib and install/setup lime
RUN mkdir ${HAXELIB_PATH} && \
haxelib setup ${HAXELIB_PATH} && \
haxelib install lime ${LIME_VERSION} --always && \
haxelib run lime setup --always
# Create a simple script that runs lime as `lime` doesn't make it onto the path from just
# running `run lime setup` for some reason
RUN echo "haxelib run lime \$@" > /usr/local/bin/lime && \
chmod +x /usr/local/bin/lime
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]