-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
66 lines (37 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# HIS HydroServer 1.0.0
# Django 2.1.5
FROM ubuntu:18.04
MAINTAINER Kenneth Lippold [email protected]
# Apt Setup ----------------------------------------------------------------------------------------------#
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install wget emacs vim sudo bzip2 nginx supervisor -y
# Create hsapp user --------------------------------------------------------------------------------------#
RUN adduser --disabled-password --gecos '' hsapp
RUN adduser hsapp sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER hsapp
ENV HYDROSERVER_HOME /home/hsapp
WORKDIR $HYDROSERVER_HOME
RUN chmod a+rwx $HYDROSERVER_HOME
# Place Application Files --------------------------------------------------------------------------------#
RUN mkdir hydroserver
COPY environment.yml $HYDROSERVER_HOME
COPY hydroserver/ $HYDROSERVER_HOME/hydroserver
COPY startup.sh $HYDROSERVER_HOME
COPY his_hydroserver.conf /etc/nginx/conf.d/
RUN sudo chown -R hsapp $HYDROSERVER_HOME/hydroserver
# Setup Conda Environment --------------------------------------------------------------------------------#
RUN wget https://repo.continuum.io/miniconda/Miniconda2-4.5.12-Linux-x86_64.sh
RUN bash Miniconda2-4.5.12-Linux-x86_64.sh -b
RUN rm Miniconda2-4.5.12-Linux-x86_64.sh
ENV PATH /home/hsapp/miniconda2/bin:$PATH
RUN conda update conda
RUN conda env create -f environment.yml
RUN echo "source activate hydroserver" > ~/.bashrc
# Expose Ports -------------------------------------------------------------------------------------------#
EXPOSE 8090
# Run HydroServer ----------------------------------------------------------------------------------------#
RUN sudo chmod +x startup.sh
USER root
CMD ["./startup.sh"]