FROM ubuntu:14.04.3

RUN apt-get update && apt-get install -y \
    curl \
    gcc \
    git \
    libssl-dev \
    make \
    python-httplib2

RUN curl --silent https://raw.githubusercontent.com/miyagawa/cpanminus/1.7039/cpanm | perl - App::cpanminus
RUN cpanm App::Download@1.0.1

WORKDIR /app

RUN download  \
    https://github.com/swagger-api/swagger-ui.git \
    --commit aafca0f \
    --include_re ^dist/ \
    --to_dir /app

WORKDIR /app/dist

EXPOSE 80

CMD python -mSimpleHTTPServer 80
