-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
83 lines (74 loc) · 2.22 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FROM debian:jessie
MAINTAINER s. rannou <mxs@sbrk.org>
# Distro
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
# Common packages
RUN apt-get install -q -y \
sudo \
wget \
python \
python-dev \
python-pip \
python-virtualenv \
openssh-server \
emacs24-nox \
git-core \
zsh \
tmux \
htop \
pep8 \
golang \
python-sphinx \
php5-cgi \
aptitude \
locales \
rubygems \
ruby-dev \
linkchecker \
links \
unzip \
curl \
imagemagick \
nodejs \
npm \
docker.io \
yaml-mode \
netcat \
s3cmd \
bc \
u-boot-tools \
libncurses-dev \
w3m \
&& apt-get clean -q -y
# Locales
RUN sed -i 's/# \(en_US.UTF-8.*\)/\1/' /etc/locale.gen \
&& locale-gen en_US en_US.UTF-8
# Setup ssh
RUN mkdir /var/run/sshd
# Setup user mxs
RUN yes | adduser --disabled-password mxs --shell /bin/zsh \
&& usermod -a -G docker mxs \
&& mkdir -p /home/mxs/.ssh/ \
&& mkdir -p /home/mxs/.config/htop \
&& wget https://github.com/aimxhaisse.keys -O /home/mxs/.ssh/authorized_keys \
&& chown -R mxs:mxs /home/mxs \
&& chmod 700 /home/mxs/.ssh \
&& chmod 600 /home/mxs/.ssh/authorized_keys \
&& echo '%mxs ALL= NOPASSWD: ALL' >> /etc/sudoers \
&& sudo -u mxs sh -c 'cd /home/mxs ; wget http://install.ohmyz.sh -O - | sh || true'
# Blog
RUN gem install redcarpet jekyll
# Confs and files
ADD confs/motd /etc/motd
ADD confs/emacs /home/mxs/.emacs
ADD confs/gitconfig /home/mxs/.gitconfig
ADD confs/zsh /home/mxs/.zshrc
ADD confs/htoprc /home/mxs/.config/htop/htoprc
RUN chown mxs:mxs /home/mxs/.emacs /home/mxs/.gitconfig /home/mxs/.zshrc
# Dockerception
ADD bin/wrapdocker /usr/local/bin/wrapdocker
RUN pip install fig
ADD bin/init /init-container
EXPOSE 22 20000
CMD ["/init-container"]