-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 737 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu
MAINTAINER feit "i@feit.me"
RUN apt-get update -qq && \
apt-get install -qqy sudo openssh-server supervisor
RUN apt-get install -qqy --no-install-recommends samba \
$(apt-get -s dist-upgrade|awk '/^Inst.*ecurity/ {print $2}')
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*
# not allow root login
RUN mkdir /var/run/sshd && \
sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin no/' /etc/ssh/sshd_config && \
sed -ri 's/#PasswordAuthentication yes/PasswordAuthentication yes/g' /etc/ssh/sshd_config && \
sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
COPY boot.sh /usr/bin/
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
EXPOSE 22 139 445
ENTRYPOINT ["boot.sh"]