-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (41 loc) · 1.33 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
FROM nvidia/cuda:10.1-cudnn7-devel
MAINTAINER snowyday
# User
ENV USER user
ENV PASS user
ENV DEBIAN_FRONTEND=noninteractive
# Libs
RUN apt-get update
RUN apt-get -y install sudo language-pack-ja openssh-server zsh \
vim git curl wget emacs htop automake build-essential \
pkg-config libevent-dev libncurses5-dev tmux lsof \
texlive-latex-extra dvipng \
software-properties-common
RUN add-apt-repository -y ppa:chris-lea/redis-server
RUN apt-get update
RUN apt-get -y install redis-server
# Lc_ALL: cannot change locale (ja_JP.UTF-8)
RUN locale-gen ja_JP.UTF-8
# could not load host key: /etc/ssh/ssh_host_rsa_key
RUN ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key
RUN /etc/init.d/ssh restart
# User
RUN adduser $USER
RUN gpasswd -a $USER sudo
RUN echo "$USER:$PASS" | chpasswd
# Set user
USER $USER
WORKDIR /home/$USER
# Prezto
RUN git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
RUN ln -s ~/.zprezto/runcoms/zlogin ~/.zlogin
RUN ln -s ~/.zprezto/runcoms/zlogout ~/.zlogout
RUN ln -s ~/.zprezto/runcoms/zpreztorc ~/.zpreztorc
RUN ln -s ~/.zprezto/runcoms/zprofile ~/.zprofile
RUN ln -s ~/.zprezto/runcoms/zshenv ~/.zshenv
RUN ln -s ~/.zprezto/runcoms/zshrc ~/.zshrc
# Set root for sshd and shell
USER root
RUN chsh -s /bin/zsh $USER
# SSH start
CMD ["/usr/sbin/sshd", "-D"]