2018-07-03 20:10:13 +03:00
|
|
|
FROM ubuntu:16.04
|
|
|
|
|
|
|
|
ARG docker_ver="17.09.0-ce"
|
|
|
|
ARG resolver="lts-11.15"
|
|
|
|
ARG stack_ver="1.7.1"
|
|
|
|
|
|
|
|
# Install GNU make, curl, git and docker client. Required to build the server
|
|
|
|
RUN apt-get -y update \
|
2018-07-10 13:01:02 +03:00
|
|
|
&& apt-get -y upgrade \
|
|
|
|
&& apt-get install -y curl g++ gcc libc6-dev libpq-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg upx netcat \
|
2018-07-03 20:10:13 +03:00
|
|
|
&& curl -Lo /tmp/docker-${docker_ver}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${docker_ver}.tgz \
|
|
|
|
&& tar -xz -C /tmp -f /tmp/docker-${docker_ver}.tgz \
|
|
|
|
&& mv /tmp/docker/* /usr/bin \
|
|
|
|
&& curl -sL https://github.com/commercialhaskell/stack/releases/download/v${stack_ver}/stack-${stack_ver}-linux-x86_64.tar.gz \
|
|
|
|
| tar xz --wildcards --strip-components=1 -C /usr/local/bin '*/stack' \
|
2018-07-10 13:01:02 +03:00
|
|
|
&& stack --resolver ${resolver} setup \
|
|
|
|
&& apt-get -y purge curl \
|
2018-07-03 20:10:13 +03:00
|
|
|
&& apt-get -y auto-remove \
|
|
|
|
&& apt-get -y clean \
|
2018-07-10 13:01:02 +03:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& rm -rf /usr/share/doc/ \
|
|
|
|
&& rm -rf /usr/share/man/ \
|
|
|
|
&& rm -rf /usr/share/locale/
|