forked from kerberos-io/machinery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
50 lines (35 loc) · 1.3 KB
/
Dockerfile.template
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
FROM resin/%%RESIN_MACHINE_NAME%%-node
ARG APP_ENV=master
ENV APP_ENV ${APP_ENV}
MAINTAINER "Cédric Verstraeten" <[email protected]>
#################################
# Surpress Upstart errors/warning
RUN dpkg-divert --local --rename --add /sbin/initctl
RUN ln -sf /bin/true /sbin/initctl
#############################################
# Let the container know that there is no tty
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y libcurl4-openssl-dev
############################
# Clone and build machinery
RUN git clone https://github.com/Charlieglider/machinery1 /tmp/machinery1 && \
cd /tmp/machinery1 && git checkout ${APP_ENV} && \
mkdir build && cd build && \
cmake .. && make && make check && make install && \
rm -rf /tmp/machinery1 && \
chown -Rf www-data.www-data /etc/opt/kerberosio && \
chmod -Rf 777 /etc/opt/kerberosio/config
#############################################
# Make config and capture directories visible
VOLUME ["/etc/opt/kerberosio/config"]
VOLUME ["/etc/opt/kerberosio/capture"]
VOLUME ["/etc/opt/kerberosio/logs"]
##############
# Expose Ports
EXPOSE 8889
#############################
# Supervisor Config and start
ADD ./supervisord.conf /etc/supervisord.conf
ADD ./run.sh /run.sh
RUN chmod 755 /run.sh
CMD ["/bin/bash", "/run.sh"]