Skip to content

Instantly share code, notes, and snippets.

@ybootin ybootin/Dockerfile
Last active Aug 29, 2015

Embed
What would you like to do?
dockerfile for haxe 2.10
FROM ubuntu:12.04
MAINTAINER Yohan Boutin <yohan.boutin@teads.tv>
RUN apt-get update
RUN apt-get -y upgrade
ENV HAXE_LIBRARY_PATH /usr/lib/haxe/std
ENV HAXEPATH /usr/bin/haxe
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install haxe git ocaml make libz-dev gcc libgc-dev zlibc zlib-bin
# build haxe 2 from source
RUN git clone -b v2-10-fix --recursive https://github.com/HaxeFoundation/haxe.git && cd haxe && make
RUN \
cd /haxe && \
rm -f $HAXEPATH && \
cp haxe $HAXEPATH && \
rm -rf /usr/lib/haxe && \
mkdir /usr/lib/haxe && \
cp -r std /usr/lib/haxe && \
mkdir /usr/lib/haxe/lib && \
chmod 777 /usr/lib/haxe/lib && \
cp haxelib /usr/bin/haxelib && \
chmod +x /usr/bin/haxelib
CMD haxe
@ybootin

This comment has been minimized.

Copy link
Owner Author

ybootin commented Nov 26, 2014

build image :
docker build -t haxe .

run image
docker run -t -i --name haxe haxe /bin/bash

delete
docker rm -f haxe

@theRemix

This comment has been minimized.

Copy link

theRemix commented Jan 27, 2015

i got an error building this

here is the relevant lines of code

 ---> 927b9668c9db
Removing intermediate container 1480c1d667fe
Step 7 : RUN git clone -b v2-10-fix --recursive https://github.com/HaxeFoundation/haxe.git && cd haxe && make
 ---> Running in 70a1e7a877fe
Cloning into 'haxe'...
make -C libs/extlib opt
make[1]: Entering directory `/haxe/libs/extlib'
ocamlopt -g -a -o extLib.cmxa enum.mli bitSet.mli dynArray.mli extArray.mli extHashtbl.mli extList.mli extString.mli global.mli IO.mli option.mli pMap.mli std.mli uChar.mli uTF8.mli base64.mli unzip.mli refList.mli optParse.mli dllist.mli multiArray.mli enum.ml bitSet.ml dynArray.ml extArray.ml extHashtbl.ml extList.ml extString.ml global.ml IO.ml option.ml pMap.ml std.ml uChar.ml uTF8.ml base64.ml unzip.ml refList.ml optParse.ml dllist.ml multiArray.ml extLib.ml
make[1]: Leaving directory `/haxe/libs/extlib'
make -C libs/extc native
make[1]: Entering directory `/haxe/libs/extc'
ocamlc -I zlib extc_stubs.c
ocamlopt -a -o extc.cmxa -I ../extlib extc.ml
make[1]: Leaving directory `/haxe/libs/extc'
make -C libs/neko
make[1]: Entering directory `/haxe/libs/neko'
ocamlopt -I ../extlib -a -o neko.cmxa nast.ml binast.ml nxml.ml
make[1]: Leaving directory `/haxe/libs/neko'
make -C libs/swflib
make[1]: Entering directory `/haxe/libs/swflib'
ocamlc -I ../extlib -I ../extc -g as3.mli
ocamlopt -I ../extlib -I ../extc -g -c as3code.ml
ocamlc -I ../extlib -I ../extc -g png.mli
ocamlopt -I ../extlib -I ../extc -g -c png.ml
ocamlopt -I ../extlib -I ../extc -g -c swf.ml
ocamlopt -I ../extlib -I ../extc -g -c actionScript.ml
ocamlopt -I ../extlib -I ../extc -g -c as3parse.ml
ocamlopt -I ../extlib -I ../extc -g -c swfPic.ml
ocamlc -I ../extlib -I ../extc -g as3hl.mli
ocamlopt -I ../extlib -I ../extc -g -c as3hlparse.ml
ocamlopt -I ../extlib -I ../extc -g -c swfParser.ml
ocamlopt -o swflib.cmxa -a  as3code.cmx png.cmx swf.cmx actionScript.cmx as3parse.cmx swfPic.cmx as3hlparse.cmx swfParser.cmx
make[1]: Leaving directory `/haxe/libs/swflib'
make -C libs/xml-light xml-light.cmxa
make[1]: Entering directory `/haxe/libs/xml-light'
ocamlyacc xml_parser.mly
ocamlc  xml.mli
ocamlc  dtd.mli
ocamlc  xml_parser.mli
ocamlopt  -c xml_parser.ml
ocamllex xml_lexer.mll
247 states, 1217 transitions, table size 6350 bytes
ocamlc  xml_lexer.mli
ocamlopt  -c xml_lexer.ml
ocamlopt  -c dtd.ml
ocamlc  xmlParser.mli
ocamlopt  -c xmlParser.ml
ocamlopt  -c xml.ml
ocamlopt -o xml-light.cmxa -a  xml_parser.cmx xml_lexer.cmx dtd.cmx xmlParser.cmx xml.cmx
make[1]: Leaving directory `/haxe/libs/xml-light'
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c ast.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c type.ml
ocamllex lexer.mll
133 states, 1496 transitions, table size 6782 bytes
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c lexer.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c common.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genxml.ml
ocamlopt -pp camlp4o -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c parser.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c typecore.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c optimizer.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c typeload.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c codegen.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genas3.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c gencommon.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c gencpp.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genjs.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genneko.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genphp.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genswf8.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c gencs.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genjava.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genswf9.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c interp.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c genswf.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c typer.ml
ocamlopt -g -I libs/extlib -I libs/extc -I libs/neko -I libs/swflib -I libs/xml-light -c main.ml
ocamlopt -o haxe -cclib libs/extc/extc_stubs.o -cclib -lz unix.cmxa str.cmxa libs/extlib/extLib.cmxa libs/xml-light/xml-light.cmxa libs/swflib/swflib.cmxa libs/extc/extc.cmxa libs/neko/neko.cmxa ast.cmx type.cmx lexer.cmx common.cmx genxml.cmx parser.cmx typecore.cmx optimizer.cmx typeload.cmx codegen.cmx genas3.cmx gencommon.cmx gencpp.cmx genjs.cmx genneko.cmx genphp.cmx genswf8.cmx gencs.cmx genjava.cmx genswf9.cmx interp.cmx genswf.cmx typer.cmx main.cmx
(cd std/tools/haxelib && HAXE_LIBRARY_PATH=../../../std ../../../haxe haxelib.hxml && cp haxelib ../../..)
(cd std/tools/haxedoc && HAXE_LIBRARY_PATH=../../../std ../../../haxe haxedoc.hxml && cp haxedoc ../../..)
 ---> 4a23caca72c0
Removing intermediate container 70a1e7a877fe
Step 8 : RUN cd /haxe &&     rm -f $HAXEPATH &&     cp haxe $HAXEPATH &&     rm -rf /usr/lib/haxe &&     mkdir /usr/lib/haxe &&     cp -r std /usr/lib/haxe &&     mkdir /usr/lib/haxe/lib &&     chmod 777 /usr/lib/haxe/lib &&     cp haxelib /usr/bin/haxelib &&     chmod +x /usr/bin/haxelib &&
 ---> Running in a451fdde757c
/bin/sh: 1: Syntax error: end of file unexpected
INFO[0353] The command [/bin/sh -c cd /haxe &&     rm -f $HAXEPATH &&     cp haxe $HAXEPATH &&     rm -rf /usr/lib/haxe &&     mkdir /usr/lib/haxe &&     cp -r std /usr/lib/haxe &&     mkdir /usr/lib/haxe/lib &&     chmod 777 /usr/lib/haxe/lib &&     cp haxelib /usr/bin/haxelib &&     chmod +x /usr/bin/haxelib &&] returned a non-zero code: 2 

and here is the whole build log http://pastebin.com/YSYNv4z6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.