Update base image

This commit is contained in:
dave 2018-10-30 22:31:05 -07:00
parent a4d56594fb
commit 6a3e784863
1 changed files with 3 additions and 9 deletions

View File

@ -1,19 +1,15 @@
FROM ubuntu:trusty
FROM ubuntu:bionic
MAINTAINER Dave P
# docker run -d -p 8822:22 -v /Users/dave/Documents/Code/docker_basessh/test:/etc/ssh/keys --name="basessh_test" shel
# Create admin
RUN useradd --create-home --groups sudo admin && \
echo "admin:admin" | chpasswd && \
locale-gen en && \
mkdir /var/run/sshd && \
apt-get update -y && \
apt-get -y install openssh-server rsync screen tmux vim supervisor htop && \
apt-get -y install openssh-server rsync supervisor sudo && \
rm -rf /etc/ssh/*_key* && \
mkdir /etc/ssh/keys && \
sed -i -E 's/HostKey \/etc\/ssh\//HostKey \/etc\/ssh\/keys\//' /etc/ssh/sshd_config && \
su -c "mkdir ~/.ssh /home/admin/persist" admin
su -c "mkdir ~/.ssh" admin
COPY authorized_keys /home/admin/.ssh/authorized_keys
@ -34,7 +30,5 @@ RUN chmod +x /start /start.d/regenerate-ssh /start.d/user-rc
# Expose ssh
EXPOSE 22
VOLUME /home/admin/persist
# Set boot command
ENTRYPOINT ["/start"]