Created
July 25, 2016 09:16
-
-
Save nitrobin/c89543f0971818d2c1763abe38c6df4c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Сборка образа с инструментарием | |
docker build -t sdk-flash-image sdk-flash | |
# Каталог кэша для монтирования в Docker контейнер в качестве домашнего каталога | |
HOME_CACHE="$HOME/.iceowl-docker-cache" | |
mkdir -p $HOME_CACHE | |
# Уникальное имя для контейнера (необязательно, но полезно для фильтрации) | |
CNTID="tmp_$(date +%Y-%m-%d.%H-%M-%S.%N)" | |
# Запуск команды в контейнере | |
# Текущий каталог из Host-системы монтируется к каталогу /workspace и делатся текущим внутри Docker-контейнера | |
# Чтобы права новых файлов не принадлежали пользователю-root, контейнер запускается от текущего пользователя $(id -u):$(id -g) и пробрасываются /etc/group /etc/passwd в режиме чтения | |
# $HOME из Docker монтируется в ~/.iceowl-docker-cache Host-системы для того чтобы работали кэши инструментов управления зависимостями вроде sbt, maven и т.д. | |
docker run \ | |
--rm \ | |
-i \ | |
--name=$CNTID \ | |
-w /workspace \ | |
-v $(pwd):/workspace \ | |
-v /etc/group:/etc/group:ro \ | |
-v /etc/passwd:/etc/passwd:ro \ | |
-v $HOME_CACHE:$HOME:rw \ | |
-u $(id -u):$(id -g) \ | |
sdk-flash-image \ | |
bash -c "cd src && haxe build.hxml && echo DONE!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:jessie | |
MAINTAINER nitrobin | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# Dependencies | |
RUN apt-get update \ | |
&& apt-get install -y \ | |
wget \ | |
libgc-dev \ | |
&& apt-get clean | |
################################################################################ | |
# Neko environment variables | |
ENV NEKOVERSION 2.0.0 | |
ENV NEKOURL http://nekovm.org/_media/neko-$NEKOVERSION-linux64.tar.gz | |
ENV NEKOPATH /opt/neko | |
ENV LD_LIBRARY_PATH $NEKOPATH | |
ENV PATH $NEKOPATH:$PATH | |
RUN mkdir -p $NEKOPATH | |
# Download Neko | |
RUN wget -O - $NEKOURL | tar xzf - --strip=1 -C $NEKOPATH | |
################################################################################ | |
# Haxe environment variables | |
ENV HAXEVERSION 3.2.1 | |
ENV HAXEURL http://haxe.org/website-content/downloads/$HAXEVERSION/downloads/haxe-$HAXEVERSION-linux64.tar.gz | |
ENV HAXEPATH /opt/haxe | |
ENV HAXE_STD_PATH $HAXEPATH/std/ | |
ENV PATH $HAXEPATH:$PATH | |
RUN mkdir -p $HAXEPATH | |
# Download Haxe | |
RUN wget -O - $HAXEURL | tar xzf - --strip=1 -C $HAXEPATH | |
# Haxelib setup | |
ENV HAXELIB_PATH /opt/haxelib | |
RUN mkdir -p $HAXEPATH $HAXELIB_PATH | |
# workaround for https://github.com/HaxeFoundation/haxe/issues/3912 | |
ENV HAXE_STD_PATH $HAXE_STD_PATH:.:/ | |
################################################################################ | |
#Install haxe libraries | |
#RUN yes|haxelib install lime 2.7.0 | |
#RUN yes|haxelib install openfl 3.4.0 | |
################################################################################ | |
CMD ["/bin/bash"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-main Main | |
-neko run.n | |
--next | |
-cmd neko run.n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main{ | |
public static function main(){ | |
trace ("Hello from Haxe!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment