-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile.cross
More file actions
33 lines (22 loc) · 848 Bytes
/
Dockerfile.cross
File metadata and controls
33 lines (22 loc) · 848 Bytes
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
FROM __BASEIMAGE_ARCH__/python:3.7.2-stretch
__CROSS_COPY qemu/qemu-__QEMU_ARCH__-static /usr/bin/
# based on https://github.com/pfichtner/docker-mqttwarn
# install python libraries (TODO: any others?)
RUN pip install paho-mqtt requests ConfigParser pycurl
# build /opt/mqttwarn
RUN mkdir -p /opt/cameraevents
WORKDIR /opt/cameraevents
# add user mqttwarn to image
RUN groupadd -r cameraevents && useradd -r -g cameraevents cameraevents
RUN chown -R cameraevents /opt/cameraevents
# process run as mqttwarn user
USER cameraevents
# conf file from host
VOLUME ["/opt/cameraevents/conf"]
# set conf path
ENV CAMERAEVENTSINI="/opt/cameraevents/conf/config.ini"
# finally, copy the current code (ideally we'd copy only what we need, but it
# is not clear what that is, yet)
COPY . /opt/cameraevents
# run process
CMD python CameraEvents.py