-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (46 loc) · 1.52 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM ruby:latest
MAINTAINER Christophe Burki, [email protected]
# Install system requirements
RUN apt-get update && apt-get install -y --no-install-recommends \
emacs24-nox \
less \
locales \
node \
openssh-server \
pwgen \
tmux \
xterm && \
apt-get autoremove -y && \
apt-get clean
# Install jekyll requirements
RUN gem install \
jekyll \
jekyll-redirect-from \
jekyll-textile-converter \
kramdown \
rouge
# Configure locales and timezone
RUN locale-gen en_US.UTF-8 en_GB.UTF-8 fr_CH.UTF-8 && \
cp /usr/share/zoneinfo/Europe/Zurich /etc/localtime && \
echo "Europe/Zurich" > /etc/timezone
# Configure sshd
RUN mkdir /var/run/sshd && \
sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config && \
sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config && \
sed -ri 's/PermitRootLogin without-password/PermitRootLogin yes/g' /etc/ssh/sshd_config && \
mkdir /root/.ssh
# s6 install and configs
COPY bin/* /usr/bin/
COPY configs/etc/s6 /etc/s6/
RUN chmod a+x /usr/bin/s6-* && \
chmod a+x /etc/s6/.s6-svscan/finish /etc/s6/sshd/run /etc/s6/sshd/finish /etc/s6/jekyll/run /etc/s6/jekyll/finish
# install setup scripts
COPY scripts/* /opt/
RUN chmod a+x /opt/setupusers.sh /opt/setupgit.sh /opt/setupenv.sh
# setup shell environment
COPY configs/bashrc /root/.bashrc
COPY configs/tmux/tmux.conf /root/.tmux.conf
RUN echo 'export PAGER=less' >> /root/.bashrc && \
echo 'export TERM=xterm' >> /root/.bashrc
EXPOSE 22 4000
CMD ["/usr/bin/s6-svscan", "/etc/s6"]