Dockerfile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM ubuntu:latest
  2. ARG version=1.0
  3. ARG timezone=America/New_York
  4. LABEL description="Supervisord Base Image for Gearmand"
  5. LABEL maintainer="Gearmand Developers https://github.com/gearman/gearmand"
  6. LABEL version="${version}"
  7. # Configure timezone
  8. ENV DEBIAN_FRONTEND=noninteractive \
  9. TZ=${timezone} \
  10. HOME=/root
  11. RUN echo $TZ > /etc/timezone
  12. # Install packages
  13. RUN apt-get update \
  14. && apt-get -y upgrade \
  15. && apt-get -y install \
  16. supervisor \
  17. tzdata \
  18. && apt-get clean autoclean \
  19. && apt-get -y autoremove \
  20. && rm -rf /var/lib/apt/lists/*
  21. # Configure service
  22. RUN mkdir -p /var/log/supervisor \
  23. && mkdir -p /var/run/supervisor \
  24. && mkdir -p /etc/supervisor/conf.d
  25. COPY supervisord.conf /etc/supervisor/supervisord.conf
  26. RUN ln -s /etc/supervisor/supervisord.conf /etc/supervisord.conf \
  27. && groupadd supervisor \
  28. && chgrp supervisor /etc/supervisor/supervisord.conf \
  29. && chmod 640 /etc/supervisor/supervisord.conf
  30. # Default command
  31. CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]