forked from towicode/DElite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile
45 lines (32 loc) · 1.09 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
## Basic Dockerfile to run DElite Django
FROM ubuntu:16.04
# First we install python
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv curl
RUN apt-get install -y git
RUN python3.6 -m pip install pip --upgrade
RUN python3.6 -m pip install wheel
# Next we set up our work environment
WORKDIR /usr/local
COPY requirements.txt .
# install irods and then setup
COPY irods.deb .
RUN apt-get install libfuse2 -y
RUN dpkg -i irods.deb
RUN printf 'data.cyverse.org\n1247\nanonymous\niplant' | iinit
# setup django
RUN python3.6 -m pip install -r requirements.txt
# copy app files
COPY app app
COPY media media
COPY runme.sh .
COPY manage.py .
# setup database
RUN python3.6 manage.py migrate
# create admin user
RUN echo "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', '[email protected]', 'admin')" | python3.6 manage.py shell
# run server
CMD [ "bash", "runme.sh"]