forked from rhyolight/omg-monitor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
57 lines (43 loc) · 1.37 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM numenta/nupic
MAINTAINER Allan Costa <allan@cloudwalk.io>
# Install redis and go
RUN \
wget http://go.googlecode.com/files/go1.1.2.linux-amd64.tar.gz;\
tar -C /usr/local -xzf go1.1.2.linux-amd64.tar.gz;\
rm go1.1.2.linux-amd64.tar.gz;\
wget http://download.redis.io/releases/redis-2.6.16.tar.gz;\
tar -xzf redis-2.6.16.tar.gz;\
cd redis-2.6.16;\
make;\
rm ../redis-2.6.16.tar.gz;
#RUN
# Install Supervisor
RUN apt-get install -y supervisor
# Add redis and go to path
ENV GOPATH /home/docker/go
ENV PATH /home/docker/redis-2.6.16/src:/usr/local/go/bin:$PATH
# Install Python dependencies (others than NuPIC)
ADD requirements.txt /home/docker/omg-monitor/requirements.txt
WORKDIR /home/docker/omg-monitor/
RUN pip install -r requirements.txt
# Install go packages and build go api
RUN \
go get github.com/codegangsta/martini;\
go get github.com/garyburd/redigo/redis;
#RUN
ADD server/ /home/docker/omg-monitor/server
# Build Go server's binary
RUN \
cd /home/docker/omg-monitor/server;\
go build;
#RUN
# Copy omg-monitor directory
ADD startup.sh /home/docker/omg-monitor/startup.sh
ADD monitor/ /home/docker/omg-monitor/monitor
ADD config/ /home/docker/omg-monitor/config
EXPOSE 5000
# Set directory for logs
ENV LOG_DIR /var/log/docker/monitor
ENV OMG_MONITOR_PORT 5000
WORKDIR /home/docker/omg-monitor/
ENTRYPOINT ["./startup.sh"]