forked from PDXostc/rvi_backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubuntu
44 lines (33 loc) · 1.31 KB
/
Dockerfile.ubuntu
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
# Copyright (C) 2014, Jaguar Land Rover
#
# This program is licensed under the terms and conditions of the
# Mozilla Public License, version 2.0. The full text of the
# Mozilla Public License is at https://www.mozilla.org/MPL/2.0/
#
# Maintainer: Rudolf Streif ([email protected])
#
# Dockerfile for rvitools on Ubuntu
# Version 0.1
# Ubuntu base image
FROM ubuntu
MAINTAINER Rudolf J Streif
# Update base image
RUN apt-get update -y
# Install system packages
RUN apt-get install -y python-pip erlang-base python-gps
# Install Python packages
RUN pip install pytz peewee kafka-python jsonrpclib
# Environment
ENV rvihome=/home/rvi rvitools=rvitools datacollector=datacollector testdata=testdata
# Create RVI home directory and rvitools directory
RUN mkdir -p ${rvihome}/${rvitools}
# Install test data
RUN mkdir -p ${rvihome}/${rvitools}/${testdata}
ADD testdata/cabspottingdata.tar.gz ${rvihome}/${rvitools}/${testdata}
# Install rvitools datacollector
RUN mkdir -p ${rvihome}/${rvitools}/${datacollector}
COPY datacollector/*.py ${rvihome}/${rvitools}/${datacollector}/
# Start datacollector by default and run it in the foreground, if started in the
# background the shell will exit and with it the Docker container.
WORKDIR ${rvihome}/${rvitools}/${datacollector}
CMD ["/usr/bin/python", "datacollector.py", "fg"]