# Use an official Python runtime as a parent image
FROM ubuntu:16.04
# Define environment variable
ENV NAME WODA.localhost
ENV USERNAME freemiumUser
ENV WORKDIR /home/$USERNAME/$NAME
ENV PATH .:/home/$USERNAME/scripts:/root/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Set the working directory to /app
WORKDIR $WORKDIR

# Install any needed packages specified in requirements.txt
#RUN pip install --trusted-host pypi.python.org -r requirements.txt
RUN apt-get update && apt-get install -y \
	apt-utils \
	git \
	curl \
	tree \
	vim \
	unzip \
	&& rm -rf /var/lib/apt/lists/* \
	&& useradd -m $USERNAME -s /bin/bash

# Copy the current directory contents into the container at /app
COPY . /home/$USERNAME/$NAME
RUN chmod +x /home/$USERNAME/$NAME/install.eamd.sh 
RUN export PATH=.:$PATH
RUN bash /home/$USERNAME/$NAME/install.eamd.sh .

# Make port 80 available to the world outside this container
EXPOSE 80


# Run app.py when the container launches
#CMD ["python", "app.py"]
CMD ["bash"]