initial commit
This commit is contained in:
commit
f56f8d64c1
|
@ -0,0 +1,33 @@
|
|||
FROM ubuntu:14.04
|
||||
MAINTAINER Dave P
|
||||
|
||||
# docker run -p 8822:22 -d --name="basessh_test" basessh /start
|
||||
|
||||
# Create admin
|
||||
RUN useradd --create-home --groups sudo admin ; \
|
||||
echo "admin:admin" | chpasswd ; \
|
||||
locale-gen en
|
||||
|
||||
# Install base software
|
||||
RUN mkdir /var/run/sshd ; \
|
||||
apt-get update -y ; \
|
||||
apt-get -y install openssh-server rsync screen tmux vim supervisor htop ; \
|
||||
rm -rf /etc/ssh/*
|
||||
|
||||
# SSH cert
|
||||
RUN su -c "mkdir ~/.ssh" admin
|
||||
COPY authorized_keys /home/admin/.ssh/authorized_keys
|
||||
RUN chown -R admin /home/admin/.ssh ; chgrp -R admin /home/admin/.ssh ; chmod -R 700 /home/admin/.ssh
|
||||
|
||||
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf
|
||||
COPY sshd.conf /etc/supervisor/conf.d/sshd.conf
|
||||
COPY cron.conf /etc/supervisor/conf.d/cron.conf
|
||||
|
||||
COPY start /start
|
||||
RUN chmod +x /start
|
||||
|
||||
# Expose ssh
|
||||
EXPOSE 22
|
||||
|
||||
# Set boot command
|
||||
CMD /start
|
|
@ -0,0 +1,3 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDF/g6WkXW1GeC7jW4nM1DCeFOQNp6Vu6T1AY7yYI+hBe77fMQl0MzeEz5TfoFRAIlDeC0guXV+mY8UcjZzsIZWnLn2Kg4PdxHtGG8JUlPxBe0/+hmqLgCdd1KusqKHaFgI6fhwMOaWCGslHXZPzS0culVk0GyClXQRTwD58R9FuhY9qScnPpg+Dhwjn4G2FzgX3N23ucvLICE39NOGqEUNpcVhCqC1BULfVFdpDSN6pIepIUIq3fdEAVsjsaCowefghdETI9v6TcbcHClWO8w0Mjuk+BxHbm2Nli4S4K1J7keg4NraYO9+FMnH7PUCqv0Ixb/RxR+186Ump5ZFDQTp dave@daves-mbp.americas.hpqcorp.net
|
||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCel0EJ4Apj/k3abQ63nDP7IyUrTWQpkN9Feg2J3azBTKhmKw1lUXXxm6Nm9Ek+SmuUTM4+nPnOv76e8HNMOsUniKVhdjw937KfxHxEoEJ/barLOsOxcmeNU5Nl0Q7TNs7UhVLw+4tSXlQKXZOUeNPuT718ri8zB9da4lV5iQZzYSH1nYzpvmrO5Gb1ImjaQPncNAM/SHbRGkspP2oxFQS7nzhDltxpDMZHbH5Q8xcuFlDMNQBcy1D1xWpXm/PhS8q/kchW0tun63M1emM8zVrNtTTlNTMxXDNeJx1oDxvcCOq8Q7QTsCWkb6f3X214uwskm6KGkXJmDDGGTvQUawcX ubuntu@shell1
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[program:cron]
|
||||
command=/usr/sbin/cron -f
|
||||
autorestart=true
|
|
@ -0,0 +1,3 @@
|
|||
[program:sshd]
|
||||
command=/usr/sbin/sshd -D
|
||||
autorestart=true
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -f /etc/ssh/sshd_config ]; then
|
||||
# Regenerate ssh key per container
|
||||
dpkg-reconfigure openssh-server
|
||||
fi
|
||||
|
||||
# start services
|
||||
supervisord
|
|
@ -0,0 +1,2 @@
|
|||
[supervisord]
|
||||
nodaemon=true
|
Loading…
Reference in New Issue