Travis: split build and test into separate scripts.
[jackhill/mal.git] / tests / docker / Dockerfile
1 FROM ubuntu:utopic
2 MAINTAINER Joel Martin <github@martintribe.org>
3
4 ENV DEBIAN_FRONTEND noninteractive
5
6 RUN echo "deb http://dl.bintray.com/sbt/debian /" > /etc/apt/sources.list.d/sbt.list
7 RUN apt-get -y update
8
9 #
10 # General dependencies
11 #
12 VOLUME /mal
13
14 RUN apt-get -y install make wget curl git
15
16 # Deps for compiled languages (C, Go, Rust, Nim, etc)
17 RUN apt-get -y install gcc pkg-config
18
19 # Deps for Java-based languages (Clojure, Scala, Java)
20 RUN apt-get -y install openjdk-7-jdk
21 ENV MAVEN_OPTS -Duser.home=/mal
22
23 # Deps for Mono-based languages (C#, VB.Net)
24 RUN apt-get -y install mono-runtime mono-mcs mono-vbnc
25
26 # Deps for node.js languages (JavaScript, CoffeeScript, miniMAL, etc)
27 RUN apt-get -y install nodejs npm
28 RUN ln -sf nodejs /usr/bin/node
29
30
31 #
32 # Implementation specific installs
33 #
34
35 # GNU awk
36 RUN apt-get -y install gawk
37
38 # Bash
39 RUN apt-get -y install bash
40
41 # C
42 RUN apt-get -y install libglib2.0 libglib2.0-dev
43 RUN apt-get -y install libffi-dev libreadline-dev libedit2 libedit-dev
44
45 # C++
46 RUN apt-get -y install g++-4.9 libreadline-dev
47
48 # Clojure
49 ADD https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein \
50 /usr/local/bin/lein
51 RUN sudo chmod 0755 /usr/local/bin/lein
52 ENV LEIN_HOME /mal/.lein
53 ENV LEIN_JVM_OPTS -Duser.home=/mal
54
55 # CoffeeScript
56 RUN npm install -g coffee-script
57 RUN touch /.coffee_history && chmod go+w /.coffee_history
58
59 # C#
60 RUN apt-get -y install mono-mcs
61
62 # Elixir
63 RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
64 && dpkg -i erlang-solutions_1.0_all.deb
65 RUN apt-get update
66 RUN apt-get -y install elixir
67
68 # Erlang R17 (so I can use maps)
69 RUN apt-get -y install build-essential libncurses5-dev libssl-dev
70 RUN cd /tmp && wget http://www.erlang.org/download/otp_src_17.5.tar.gz \
71 && tar -C /tmp -zxf /tmp/otp_src_17.5.tar.gz \
72 && cd /tmp/otp_src_17.5 && ./configure && make && make install \
73 && rm -rf /tmp/otp_src_17.5 /tmp/otp_src_17.5.tar.gz
74 # Rebar for building the Erlang implementation
75 RUN cd /tmp/ && git clone -q https://github.com/rebar/rebar.git \
76 && cd /tmp/rebar && ./bootstrap && cp rebar /usr/local/bin \
77 && rm -rf /tmp/rebar
78
79 # Forth
80 RUN apt-get -y install gforth
81
82 # Go
83 RUN apt-get -y install golang
84
85 # Guile
86 RUN apt-get -y install libunistring-dev libgc-dev autoconf libtool flex gettext texinfo libgmp-dev
87 RUN git clone git://git.sv.gnu.org/guile.git /tmp/guile \
88 && cd /tmp/guile && ./autogen.sh && ./configure && make && make install
89
90 # Haskell
91 RUN apt-get -y install ghc haskell-platform libghc-readline-dev libghc-editline-dev
92
93 # Java
94 RUN apt-get -y install maven2
95
96 # JavaScript
97 # Already satisfied above
98
99 # Julia
100 RUN apt-get -y install software-properties-common
101 RUN apt-add-repository -y ppa:staticfloat/juliareleases
102 RUN apt-get -y update
103 RUN apt-get -y install julia
104
105 # Lua
106 RUN apt-get -y install lua5.1 lua-rex-pcre luarocks
107 RUN luarocks install linenoise
108
109 # Mal
110 # N/A: self-hosted on other language implementations
111
112 # GNU Make
113 # Already satisfied as a based dependency for testing
114
115 # miniMAL
116 RUN npm install -g minimal-lisp
117
118 # Nim
119 RUN cd /tmp && wget http://nim-lang.org/download/nim-0.11.0.tar.xz \
120 && tar xvJf /tmp/nim-0.11.0.tar.xz && cd nim-0.11.0 \
121 && make && sh install.sh /usr/local/bin \
122 && rm -r /tmp/nim-0.11.0
123
124 # OCaml
125 RUN apt-get -y install ocaml-batteries-included
126
127 # perl
128 RUN apt-get -y install perl
129
130 # PHP
131 RUN apt-get -y install php5-cli
132
133 # PostScript/ghostscript
134 RUN apt-get -y install ghostscript
135
136 # python
137 RUN apt-get -y install python
138
139 # R
140 RUN apt-get -y install r-base-core
141
142 # Racket
143 RUN apt-get -y install racket
144
145 # Ruby
146 RUN apt-get -y install ruby
147
148 # Rust
149 RUN curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh
150
151 # Scala
152 RUN apt-get -y --force-yes install sbt
153 RUN apt-get -y install scala
154 ENV SBT_OPTS -Duser.home=/mal
155
156 # VB.Net
157 RUN apt-get -y install mono-vbnc
158
159 # TODO: move up
160 # Factor
161 RUN apt-get -y install libgtkglext1
162 RUN cd /usr/lib/x86_64-linux-gnu/ \
163 && wget http://downloads.factorcode.org/releases/0.97/factor-linux-x86-64-0.97.tar.gz \
164 && tar xvzf factor-linux-x86-64-0.97.tar.gz \
165 && ln -sf /usr/lib/x86_64-linux-gnu/factor/factor /usr/bin/factor \
166 && rm factor-linux-x86-64-0.97.tar.gz
167
168 # MATLAB is proprietary/licensed. Maybe someday with Octave.
169 # Swift is XCode/OS X only
170 ENV SKIP_IMPLS matlab swift
171
172 ENV DEBIAN_FRONTEND newt
173 ENV HOME /
174
175 WORKDIR /mal