-
Notifications
You must be signed in to change notification settings - Fork 36
/
Dockerfile
52 lines (38 loc) · 2.03 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
# apache-storm-0.10.0
#
# VERSION 1.0
# use the ubuntu base image provided by dotCloud
FROM ubuntu:15.10
MAINTAINER Florian HUSSONNOIS, florian.hussonnois_gmail.com
RUN apt-get update && \
apt-get upgrade -y
# Install Oracle JDK 8 and others useful packages
RUN apt-get install -y python-software-properties software-properties-common && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install -y oracle-java8-installer && \
apt-get clean autoclean && \
apt-get autoremove -y && \
apt-get install -y supervisor wget tar && \
rm -rf /var/lib/apt /var/lib/dpkg /var/lib/cache /var/lib/log
# Tells Supervisor to run interactively rather than daemonize
RUN echo [supervisord] | tee -a /etc/supervisor/supervisord.conf ; echo nodaemon=true | tee -a /etc/supervisor/supervisord.conf
ENV STORM_VERSION 1.0.1
# Create storm group and user
ENV STORM_HOME /usr/share/apache-storm
RUN groupadd storm; useradd --gid storm --home-dir /home/storm --create-home --shell /bin/bash storm
# Download and Install Apache Storm
RUN wget http://apache.mirrors.ovh.net/ftp.apache.org/dist/storm/apache-storm-$STORM_VERSION/apache-storm-$STORM_VERSION.tar.gz && \
tar -xzvf apache-storm-$STORM_VERSION.tar.gz -C /usr/share && mv $STORM_HOME-$STORM_VERSION $STORM_HOME && \
rm -rf apache-storm-$STORM_VERSION.tar.gz
RUN mkdir /var/log/storm ; chown -R storm:storm /var/log/storm ; ln -s /var/log/storm /home/storm/log
RUN ln -s $STORM_HOME/bin/storm /usr/bin/storm
ADD conf/storm.yaml.template $STORM_HOME/conf/storm.yaml.template
# Add scripts required to run storm daemons under supervision
ADD script/entrypoint.sh /home/storm/entrypoint.sh
ADD supervisor/storm-daemon.conf /home/storm/storm-daemon.conf
RUN chown -R storm:storm $STORM_HOME && chmod u+x /home/storm/entrypoint.sh
# Add VOLUMEs to allow backup of config and logs
VOLUME ["/usr/share/apache-storm/conf","/var/log/storm"]
ENTRYPOINT ["/bin/bash", "/home/storm/entrypoint.sh"]