docker-debian-repository/Dockerfile

43 lines
995 B
Text
Raw Normal View History

2014-08-12 21:04:26 +00:00
FROM debian:testing
MAINTAINER Glenn Y. Rolland <glenux@glenux.net>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
2014-08-12 22:34:00 +00:00
# Install supervisor for managing services
2014-08-13 08:52:22 +00:00
RUN apt-get install -q -y supervisor cron openssh-server pwgen reprepro screen vim-tiny sudo
2014-08-12 22:34:00 +00:00
RUN service supervisor stop
ADD configs/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Install cron for managing regular tasks
ADD configs/supervisor-cron.conf /etc/supervisor/conf.d/cron.conf
RUN sed -i 's/\(session *required *pam_loginuid.so\)/#\1/' /etc/pam.d/cron
# Install ssh
ADD configs/supervisor-ssh.conf /etc/supervisor/conf.d/ssh.conf
RUN mkdir /var/run/sshd
2014-08-13 08:52:22 +00:00
RUN service ssh start ; sleep 1
RUN service ssh stop
# Setup root & sudo access
RUN echo "root:docker" | chpasswd
RUN echo %sudo ALL=NOPASSWD: ALL >> /etc/sudoers
2014-08-12 21:04:26 +00:00
ENV DEBIAN_FRONTEND newt
ADD scripts/start.sh /start.sh
2014-08-12 22:34:00 +00:00
RUN chmod 755 /start.sh
2014-08-12 21:04:26 +00:00
2014-08-13 08:52:22 +00:00
VOLUME ["/docker/keys", "/docker/incoming"]
2014-08-12 21:04:26 +00:00
EXPOSE 80
EXPOSE 22
CMD ["/bin/bash", "/start.sh"]