Update Dockerfile to use LLVM 3.9 (#1368)
Update Dockerfile to use LLVM 3.9 (#1368)

The Dockerfile was using the apt package llvm-dev which installed llvm 3.8.0.
This change will Install the prebuilt binary of llvm 3.9.0 instead.
FROM ubuntu:16.04

RUN apt-get update \
 && apt-get install -y make g++ git \
                       zlib1g-dev libncurses5-dev libssl-dev \
                       llvm-dev libpcre2-dev \
 && rm -rf /var/lib/apt/lists/*

WORKDIR /src/ponyc
COPY Makefile LICENSE VERSION /src/ponyc/
COPY src      /src/ponyc/src
COPY lib      /src/ponyc/lib
COPY test     /src/ponyc/test
COPY packages /src/ponyc/packages

RUN make config=release install \
 && rm -rf /src/ponyc/build

RUN mkdir /src/main
WORKDIR   /src/main

CMD ponyc

FROM ubuntu:16.04

RUN apt-get update \
 && apt-get install -y make g++ git wget xz-utils \
                       zlib1g-dev libncurses5-dev libssl-dev \
                       libpcre2-dev \
 && rm -rf /var/lib/apt/lists/* \
 && wget http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz \
 && tar xf clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz \
 && cp -r clang+llvm-3.9.0-x86_64-linux-gnu-ubuntu-16.04/* /usr/local \
 && rm -rf /clang*

WORKDIR /src/ponyc
COPY Makefile LICENSE VERSION /src/ponyc/
COPY src      /src/ponyc/src
COPY lib      /src/ponyc/lib
COPY test     /src/ponyc/test
COPY packages /src/ponyc/packages

RUN make \
 && make install \
 && rm -rf /src/ponyc/build

RUN mkdir /src/main
WORKDIR /src/main

CMD ponyc
