#################################################################
# Dockerfile
#
# Software:         SciDAP base Image
# Software Version: v0.0.3
# Description:      Basic image for SciDAP
# Website:          http://scidap.com/
# Provides:         autotools-dev, automake, cmake, curl, fuse, git, wget, zip, openjdk-9-jre-headless, build-essential, pkg-config, python, python-dev, python-pip, zlib1g-dev
# Base Image:       ubuntu:16.04
# Build Cmd:        docker build --rm -t biowardrobe2/scidap:v0.0.3 -f scidap-Dockerfile .
# Pull Cmd:         docker pull biowardrobe2/scidap:v0.0.3
# Run Cmd:          docker run --rm -ti biowardrobe2/scidap:v0.0.3 bash
#################################################################

### Base Image
FROM ubuntu:16.04
MAINTAINER Andrey V Kartashov "porter@porter.st"

ENV DEBIAN_FRONTEND noninteractive

################## BEGIN INSTALLATION ######################

# add apt mirrors
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bkp && \
    bash -c 'echo -e "deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse\n\
                      deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse\n\
                      deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main restricted universe multiverse\n\
                      deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted universe multiverse\n\n" > /etc/apt/sources.list' && \
    cat /etc/apt/sources.list.bkp >> /etc/apt/sources.list && \
    cat /etc/apt/sources.list

# apt update and install global requirements
RUN apt-get clean all &&\
    apt-get update &&\
    apt-get upgrade -y && \
    apt-get install -y --no-install-recommends \
        autotools-dev   \
        automake        \
        cmake           \
        curl            \
        fuse            \
        git             \
        wget            \
        zip             \
        unzip           \
        openjdk-8-jdk   \
        build-essential \
        pkg-config      \
        python          \
        python-dev      \
        python-pip      \
        zlib1g-dev      \
        p7zip-full      \
        file            \
        libmagic-dev  &&\
    apt-get clean && \
    apt-get purge && \
    pip install python-magic &&\
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
