This commit is contained in:
Linux User
2022-01-15 13:20:51 +01:00
parent 4fb0572693
commit 25382829f0
7 changed files with 135 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
FROM ubuntu:20.04
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y openssh-server git
RUN mkdir /var/run/sshd
RUN echo 'root:$1$jgBLBi/m$3Dk1spVwbXoeZxW4nmoU6.' | chpasswd -e
RUN sed -i 's/#*PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd
# ENV NOTVISIBLE "in users profile"
# RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

View File

@@ -0,0 +1,17 @@
version: "3"
services:
ssheditor:
# image: adix/ssheditor
build:
dockerfile: ConfigEditor.Dockerfile
context: .
container_name: configeditor
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# - "/home/adam/containerconfig:/containerconfig"
# - "/home/adam/dockerconfig:/dockerconfig"
- "/mnt/Data/.system/:/docker"
ports:
- "2202:22"