forked from certsocietegenerale/FIR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (43 loc) · 1.13 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
# Dockerfile for FIR development instance
# written by Robert Haist
#
# Mostly based on the ubuntu image by Kyle Maxwell
#
# build with the command:
#
# sudo docker build -t fir .
# sudo docker run -it -p 8000:8000 fir
#
# then access http://localhost:8000 in your browser
# MAINTAINER Robert Haist, [email protected]
FROM alpine:3.7
RUN apk add --update \
python \
python-dev \
py-pip \
build-base \
git \
libxml2 \
libxml2-dev \
libxslt \
libxslt-dev \
postgresql-dev \
&& rm -rf /var/cache/apk/*
RUN addgroup fir && \
adduser -D -G fir -s /sbin/nologin fir
WORKDIR /app
RUN git clone https://github.com/certsocietegenerale/FIR.git && \
chown -R fir:fir /app/FIR && \
cd FIR && \
pip install -r requirements.txt && \
cp fir/config/installed_apps.txt.sample fir/config/installed_apps.txt
USER fir
ENV HOME /app/FIR
ENV USER fir
WORKDIR /app/FIR
RUN ./manage.py migrate && \
./manage.py loaddata incidents/fixtures/seed_data.json && \
./manage.py loaddata incidents/fixtures/dev_users.json
EXPOSE 8000
ENTRYPOINT ["/app/FIR/manage.py"]
CMD ["runserver", "0.0.0.0:8000"]