FROM debian:stable-slim

ENV CWD=/opt/app HOME=/opt/app TERM=xterm

RUN apt-get update && apt-get install -y bash curl inotify-tools git build-essential libtinfo5

RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install -y yarn
RUN curl -L https://github.com/coot/zephyr/releases/download/v0.3.2/Linux.tar.gz | tar zx -C /usr/bin --strip-components=1 zephyr/zephyr

RUN curl -L https://github.com/dhall-lang/dhall-haskell/releases/download/1.38.1/dhall-json-1.7.6-x86_64-linux.tar.bz2 | tar jx -C /usr/bin --strip-components=2 ./bin/dhall-to-json
RUN yarn global add purescript spago pulp

WORKDIR /opt/app
EXPOSE 5000/tcp
CMD ["bash"]