-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
31 lines (20 loc) · 1.14 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
FROM ubuntu:14.04
MAINTAINER Michaël Faille <[email protected]>
# Install packages
RUN apt-get update -y && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install openssh-server ca-certificates pwgen supervisor git tar vim-nox vim-syntax-go wget --no-install-recommends && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# #https://github.com/docker/docker/issues/6103
RUN mkdir -p /var/run/sshd && sed -i "s/UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && sed -i "s/PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config && sed -ri 's/UsePAM yes/UsePAM no/g' /etc/ssh/sshd_config
# define volume
VOLUME /data/persistent
# Define working directory.
WORKDIR /data
ADD set_root_pw.sh /data/set_root_pw.sh
ADD run.sh /data/run.sh
# As suggested here : http://docs.docker.com/articles/using_supervisord/
ADD supervisord_nuagebec.conf /etc/supervisor/conf.d/supervisord_nuagebec.conf
ADD sshd.conf /etc/supervisor/conf.d/sshd.conf
RUN chmod a+x /data/*.sh
# ## Strangely... docker.io don't want build this image since xterm env..
# # ENV TERM="xterm-color"
EXPOSE 22
CMD ["/data/run.sh"]