-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathDockerfile_ssh2_arm
More file actions
32 lines (26 loc) · 1.16 KB
/
Dockerfile_ssh2_arm
File metadata and controls
32 lines (26 loc) · 1.16 KB
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
FROM arm64v8/centos:7
RUN yum -y update; yum clean all
RUN yum -y install systemd; yum clean all;
# (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
# rm -f /lib/systemd/system/multi-user.target.wants/*;\
# rm -f /etc/systemd/system/*.wants/*;\
# rm -f /lib/systemd/system/local-fs.target.wants/*; \
# rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
# rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
# rm -f /lib/systemd/system/basic.target.wants/*;\
# rm -f /lib/systemd/system/anaconda.target.wants/*;
VOLUME ["/sys/fs/cgroup"]
# install sshd
RUN yum install -y epel-release
RUN yum install -y openssh-clients
RUN yum install -y openssh-server \
&& sed 's/#PermitRootLogin yes/PermitRootLogin yes/' -i /etc/ssh/sshd_config \
&& echo 'root:P@ssw0rd' | chpasswd \
&& ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
# RUN yum install -y iptables
# RUN yum update -y
# RUN yum install -y docker docker-registry
# RUN sed -i -e 's/overlay2/vfs/g' /etc/sysconfig/docker-storage
EXPOSE 22
# ENTRYPOINT ["/sbin/init", "systemctl", "start", "sshd"]
ENTRYPOINT ["systemctl", "start", "sshd"]