-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (20 loc) · 871 Bytes
/
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
FROM gliderlabs/alpine:3.3
MAINTAINER Pål Karlsrud <[email protected]>
RUN apk-install --no-cache python git py-pip python-dev linux-headers musl-dev gcc supervisor
RUN mkdir -p /etc/supervisor.d/
RUN pip install virtualenv
ENV BASE_DIR /var/communication-backend
ENV BOOTSTRAP_PORT 10002
RUN git clone https://github.com/microserv/backend-communication ${BASE_DIR}
WORKDIR ${BASE_DIR}
RUN virtualenv venv
RUN cp node_api.ini /etc/supervisor.d/
RUN cp register_service.ini /etc/supervisor.d/
RUN ${BASE_DIR}/venv/bin/pip install -r requirements.txt
RUN git clone https://github.com/microserv/entangled-dht entangled
RUN cd entangled && ${BASE_DIR}/venv/bin/python setup.py install
RUN rm -rf entangled/
# 9001 is the default port to the node API, and 10002 is the port used by the
# nodes internally.
EXPOSE 9001 10002
ENTRYPOINT ["/usr/bin/supervisord", "-t", "-n"]