Added SSH to wordpress image

This commit is contained in:
Deon George 2017-12-18 00:18:10 +11:00
parent 157ab8609b
commit eb07d5f1f9
2 changed files with 17 additions and 23 deletions

View File

@ -1,13 +1,9 @@
# NAME leenooks/php
# VERSION 7.1-fpm-plus
# NAME leenooks/wordpress
# VERSION 4.9.1-fpm
FROM php:7.1-fpm
RUN echo "deb http://deb.debian.org/debian jessie non-free" >> /etc/apt/sources.list.d/non-free.list && apt-get update && apt-get install -y pkg-config libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev libsnmp-dev snmp-mibs-downloader \
&& download-mibs \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) pdo_mysql bz2 gettext sockets gmp gd pcntl snmp
FROM wordpress:4.9.1-fpm
RUN apt-get install -y openssh-server && useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp
RUN apt-get update && apt-get install -y openssh-server && useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp
EXPOSE 9000/tcp 22/tcp
COPY sshd_config.patch /tmp

View File

@ -1,20 +1,18 @@
--- /etc/ssh/sshd_config.orig 2017-12-13 10:12:21.098005827 +0000
+++ /etc/ssh/sshd_config 2017-12-13 10:14:11.461687661 +0000
@@ -25,7 +25,7 @@
--- /etc/ssh/sshd_config.orig 2017-12-17 13:08:18.460496574 +0000
+++ /etc/ssh/sshd_config 2017-12-17 13:10:01.093459593 +0000
@@ -30,6 +30,7 @@
# Authentication:
LoginGraceTime 120
-PermitRootLogin without-password
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
+PermitRootLogin no
StrictModes yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
@@ -54,6 +55,7 @@
RSAAuthentication yes
@@ -49,7 +49,7 @@
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
-#PasswordAuthentication yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
+PasswordAuthentication no
#PermitEmptyPasswords no
# Kerberos options
#KerberosAuthentication no
# Change to yes to enable challenge-response passwords (beware issues with