infra/codestorage/hg-ssh
infra/codestorage/hg-ssh/Dockerfile
Use the relative DNS address. Use the relative DNS address when digging for web frontends, which now works thanks to +search on dig. This allows us to transfer between namespaces without needing to change anything. Also makes this, in general, more flexible.
1 FROM secondbit/hg-repo-sync
2 MAINTAINER Paddy "<paddy@secondbit.org>"
4 ADD create_user.sh /usr/local/bin/helpers/create_user.sh
5 RUN chmod +x /usr/local/bin/helpers/create_user.sh
6 ADD run.sh /usr/local/bin/helpers/run-ssh.sh
7 RUN chmod +x /usr/local/bin/helpers/run-ssh.sh
8 ADD pullkeys.sh /usr/local/bin/helpers/pullkeys.sh
9 RUN chmod +x /usr/local/bin/helpers/pullkeys.sh
10 ADD post-commit-broadcast.sh /usr/local/bin/helpers/broadcast-to-frontends.sh
11 RUN chmod +x /usr/local/bin/helpers/broadcast-to-frontends.sh
13 ADD hgrc /etc/mercurial/hgrc
15 RUN mkdir /var/run/sshd
17 # install required packages
18 RUN apt-get -y update
19 RUN apt-get -y install openssh-server dnsutils
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/local/bin/helpers/run-ssh.sh"]