infra/codestorage/hg-ssh
2015-08-17
Child:2f4a2a20ad6d
infra/codestorage/hg-ssh/Dockerfile
Initial commit. This hardcodes more than it should and syncs with Google Cloud Storage more than is really necessary, but it A) works and B) is currently on code.secondbit.org, so that should probably be recorded for posterity.
1 FROM ubuntu:14.04
2 MAINTAINER Paddy Foran "<paddy@secondbit.org>"
4 RUN groupadd -g 2000 committers
5 RUN mkdir -p /mounted/repos
6 RUN chown -R root:committers /mounted/repos
7 RUN chmod 0770 /mounted/repos
8 VOLUME /mounted
10 ADD create_user.sh /usr/local/bin/helpers/create_user.sh
11 RUN chmod +x /usr/local/bin/helpers/create_user.sh
12 VOLUME /home
14 RUN mkdir /var/run/sshd
16 # install required packages
17 RUN apt-get -y update
18 RUN apt-get -y install openssh-server python-pip python-dev
19 RUN pip install Mercurial
21 #ADD sshd_config /etc/ssh/sshd_config
22 RUN sed -ri 's/session required pam_loginuid.so/session optional pam_loginuid.so/g' /etc/pam.d/sshd
23 RUN sed -ri 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config
24 RUN sed -ri 's/PermitRootLogin without-password/PermitRootLogin no/g' /etc/ssh/sshd_config
26 EXPOSE 22
28 CMD ["/usr/sbin/sshd", "-D"]