Last active
August 16, 2016 16:37
-
-
Save pastleo/50d74debbbaedab37fbce55e822d4ecc to your computer and use it in GitHub Desktop.
COSCUP 2016 Git-it on Docker Workshop: 我的 Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
RUN \ | |
apt-get update -qq && \ | |
apt-get install -y git nodejs npm vim nano openssh-server rsyslog curl && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
RUN ln -s /usr/bin/nodejs /usr/bin/node | |
RUN npm install -g git-it | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:git-it' | chpasswd | |
RUN chage -d 0 root | |
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | |
ADD crontab /etc/crontab | |
ADD client-start.sh /usr/bin/client-start.sh | |
ADD scoreboard-reporter.sh /usr/bin/scoreboard-reporter.sh | |
RUN chmod +x /usr/bin/client-start.sh | |
RUN chmod +x /usr/bin/scoreboard-reporter.sh | |
RUN touch /var/log/cron.log | |
LABEL role="git-it-client" | |
EXPOSE 22 | |
CMD ["/usr/bin/client-start.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment