To show runit, socklog, svlogd in docker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

57 lines
1.8 KiB

  1. FROM centos:7
  2. MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
  3. WORKDIR /root
  4. RUN yum -y update && \
  5. yum -y install make gcc glibc-static
  6. # Compile runit
  7. # Deps: glibc-static
  8. ENV RUNIT_NAME "runit-2.1.2"
  9. ENV RUNIT_HASH "6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18"
  10. RUN pushd /opt && \
  11. curl -#L -o $RUNIT_NAME.tar.gz http://smarden.org/runit/$RUNIT_NAME.tar.gz && \
  12. sha256sum $RUNIT_NAME.tar.gz |grep -qw $RUNIT_HASH && \
  13. tar xf $RUNIT_NAME.tar.gz && \
  14. rm -f $RUNIT_NAME.tar.gz && \
  15. pushd admin/$RUNIT_NAME && \
  16. find . -xdev -type f -name "fmt_ptime.c" -exec sed -i.orig 's;gmtime;localtime;g' '{}' \; && \
  17. package/install && \
  18. package/install-man
  19. # Compile socklog
  20. ENV SOCKLOG_NAME "socklog-2.1.0"
  21. ENV SOCKLOG_HASH "aa869a787ee004da4e5509b5a0031bcc17a4ab4ac650c2ce8d4e488123acb455"
  22. RUN pushd /opt && \
  23. curl -#L -o $SOCKLOG_NAME.tar.gz http://smarden.org/socklog/$SOCKLOG_NAME.tar.gz && \
  24. sha256sum $SOCKLOG_NAME.tar.gz |grep -qw $SOCKLOG_HASH && \
  25. tar xf $SOCKLOG_NAME.tar.gz && \
  26. rm -f $SOCKLOG_NAME.tar.gz && \
  27. pushd admin/$SOCKLOG_NAME && \
  28. package/install && \
  29. package/install-man
  30. # runit-docker - painlessly use Runit in Docker containers
  31. RUN curl -#L -o runit-docker.tar.gz https://github.com/pixers/runit-docker/archive/master.tar.gz && \
  32. tar xf runit-docker.tar.gz && \
  33. cd runit-docker-master/ && \
  34. make && \
  35. make install && \
  36. sed -i 's;runsvdir;runsvdir -P;g' /sbin/runit-docker
  37. ENV TZ "Europe/Amsterdam"
  38. # RUN ln -svf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime
  39. COPY service /etc/service/
  40. RUN chmod +x -- /etc/service/*/run /etc/service/*/log/run
  41. ENTRYPOINT ["/sbin/runit-docker"]
  42. VOLUME ["/var/log/fakeapp1", \
  43. "/var/log/fakeapp2", \
  44. "/var/log/fakeapp3"]