-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
57 lines (45 loc) · 1.49 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 ruby:2.3-alpine
MAINTAINER Keith McClellan <keith.mcclellan@mesosphere.io>
RUN apk update && apk upgrade
RUN apk add curl wget bash
RUN apk add ruby ruby-bundler nodejs
# Needed for make native extensions
RUN apk add ruby-dev g++ musl-dev make
RUN echo "gem: --no-document" > /etc/gemrc
#RUN gem update --system
RUN gem install bundler smashing json cassandra-driver ruby-kafka
# Create dashboard and link volumes
RUN smashing new smashing
WORKDIR /smashing
RUN cd /smashing \
&& bundle \
&& ln -s /smashing/dashboards /dashboards \
&& ln -s /smashing/jobs /jobs \
&& ln -s /smashing/assets /assets \
&& ln -s /smashing/lib /lib-smashing \
&& ln -s /smashing/public /public \
&& ln -s /smashing/widgets /widgets \
&& mkdir /smashing/config \
&& mv /smashing/config.ru /smashing/config/config.ru \
&& ln -s /smashing/config/config.ru /smashing/config.ru \
&& ln -s /smashing/config /config \
&& rm -rf /var/cache/apk/*
COPY run.sh /
COPY dashboards/ /dashboards/
COPY widgets/ /widgets/
COPY jobs/ /jobs/
COPY assets/ /assets/
COPY public/ /public/
COPY lib/ /lib-smashing/
VOLUME ["/dashboards", "/jobs", "/lib-smashing", "/config", "/public", "/widgets", "/assets"]
#RUN echo "original Gemfile"
#RUN cat Gemfile
#RUN sed -i -e '$a\' Gemfile
#RUN echo "gem 'json'" >> Gemfile
#RUN echo "updated Gemfile"
#RUN cat Gemfile
RUN bundle install
ENV PORT 3030
EXPOSE $PORT
WORKDIR /smashing
CMD ["/run.sh"]