forked from B-LAB/panyabot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (36 loc) · 979 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
################################################
# Dockerfile to build panyabot container images
# Based on raspbian
################################################
#Set the base image to raspbian
FROM resin/raspberrypi-systemd:wheezy
# File Author / Maintainer
MAINTAINER Wachira Ndaiga
# Update the repository sources list and install dependancies
RUN sudo apt-get update && apt-get install -y \
python \
python-dev \
python-pip \
usbutils \
bluez \
python-gobject \
python-bluez \
nano \
picocom
# Set application directory tree
COPY . /panyabot
WORKDIR /panyabot
RUN cd /panyabot
# Create running environment
RUN pip install virtualenv
RUN virtualenv flask --system-site-packages
RUN flask/bin/pip install -r requirements.txt
RUN chmod 755 run.sh
RUN chmod 755 app/rfcommlin.sh
# Expose ports
EXPOSE 5000
# Create environment variables
ENV INITSYSTEM on
ENV XDG_RUNTIME_DIR /run/user/%I
# Start web app
CMD ["/bin/bash", "run.sh"]