-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (25 loc) · 979 Bytes
/
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
#FROM phusion/images4
FROM phusion/baseimage:0.9.19
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# ...put your own build instructions here...
RUN apt-get update
RUN apt-get install -y inetutils-ping net-tools python python-pip python-apt-common sudo git
RUN apt-get install -y ansible
#Enabling SSH
RUN rm -f /etc/service/sshd/down
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN /usr/sbin/enable_insecure_key
RUN echo "[testhost]\n127.0.0.1" >> /etc/ansible/hosts
RUN ssh-keygen -t ecdsa -P '' -f ~/.ssh/id_ecdsa
RUN cat ~/.ssh/id_ecdsa.pub >> ~/.ssh/authorized_keys
##Disable checking
RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
RUN echo "IgnoreUserKnownHosts yes" >> /etc/ssh/sshd_config
RUN chmod 700 /root/.ssh
RUN chmod 644 /root/.ssh/authorized_keys
RUN echo "Successful!"
EXPOSE 8080
EXPOSE 3300
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*