forked from CitoyensCapteurs/CitizenWatt-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_readonly_mode
31 lines (24 loc) · 934 Bytes
/
Dockerfile_readonly_mode
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
FROM ubuntu:14.04
MAINTAINER Phyks <phyks@phyks.me>
# Set LANG
ENV LANG C.UTF-8
# Install packages
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install -y postgresql postgresql-server-dev-all redis-server python3 python3-pip build-essential python3-dev git
RUN pip3 install requests sqlalchemy pycrypto numpy cherrypy psycopg2 redis
# Configure the system
ADD init.sh /tmp/init.sh
RUN chmod 775 /tmp/init.sh
RUN /tmp/init.sh
RUN rm /tmp/init.sh
# Get CitizenWatt
RUN git clone https://github.com/CitoyensCapteurs/CitizenWatt-Base /opt/citizenwatt
ADD test_process.py /opt/citizenwatt/test_process.py
RUN chmod 775 /opt/citizenwatt/test_process.py
# Init CitizenWatt config
RUN cd /opt/citizenwatt && echo "import libcitizenwatt.config as config; c = config.Config(); c.set('readonly', True); c.save()" | python3
ADD start.sh /start.sh
RUN chmod 755 /start.sh
ENTRYPOINT ["/bin/bash", "-e", "/start.sh"]
EXPOSE 8080