show-runit/Dockerfile

57 lines
1.8 KiB
Docker
Raw Normal View History

2016-07-16 16:09:54 +00:00
FROM centos:7
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
WORKDIR /root
RUN yum -y update && \
yum -y install make gcc glibc-static
# Compile runit
# Deps: glibc-static
ENV RUNIT_NAME "runit-2.1.2"
ENV RUNIT_HASH "6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18"
RUN pushd /opt && \
curl -#L -o $RUNIT_NAME.tar.gz http://smarden.org/runit/$RUNIT_NAME.tar.gz && \
sha256sum $RUNIT_NAME.tar.gz |grep -qw $RUNIT_HASH && \
tar xf $RUNIT_NAME.tar.gz && \
rm -f $RUNIT_NAME.tar.gz && \
pushd admin/$RUNIT_NAME && \
find . -xdev -type f -name "fmt_ptime.c" -exec sed -i.orig 's;gmtime;localtime;g' '{}' \; && \
package/install && \
package/install-man
# Compile socklog
ENV SOCKLOG_NAME "socklog-2.1.0"
ENV SOCKLOG_HASH "aa869a787ee004da4e5509b5a0031bcc17a4ab4ac650c2ce8d4e488123acb455"
RUN pushd /opt && \
curl -#L -o $SOCKLOG_NAME.tar.gz http://smarden.org/socklog/$SOCKLOG_NAME.tar.gz && \
sha256sum $SOCKLOG_NAME.tar.gz |grep -qw $SOCKLOG_HASH && \
tar xf $SOCKLOG_NAME.tar.gz && \
rm -f $SOCKLOG_NAME.tar.gz && \
pushd admin/$SOCKLOG_NAME && \
package/install && \
package/install-man
# runit-docker - painlessly use Runit in Docker containers
RUN curl -#L -o runit-docker.tar.gz https://github.com/pixers/runit-docker/archive/master.tar.gz && \
tar xf runit-docker.tar.gz && \
cd runit-docker-master/ && \
make && \
make install && \
sed -i 's;runsvdir;runsvdir -P;g' /sbin/runit-docker
ENV TZ "Europe/Amsterdam"
# RUN ln -svf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
COPY service /etc/service/
RUN chmod +x -- /etc/service/*/run /etc/service/*/log/run
ENTRYPOINT ["/sbin/runit-docker"]
VOLUME ["/var/log/fakeapp1", \
2016-07-16 16:15:55 +00:00
"/var/log/fakeapp2", \
"/var/log/fakeapp3"]