initial commit
This commit is contained in:
commit
834a505601
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
docs/
|
||||
*.pub
|
6
Caddyfile
Normal file
6
Caddyfile
Normal file
@ -0,0 +1,6 @@
|
||||
:80 {
|
||||
root * /www/html
|
||||
file_server
|
||||
try_files {path}.html {path}
|
||||
}
|
||||
|
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@ -0,0 +1,28 @@
|
||||
FROM ubuntu:latest
|
||||
|
||||
RUN apt-get update && apt-get install -y openssh-server rsync
|
||||
RUN mkdir /var/run/sshd
|
||||
|
||||
#ARG ROOT_PASSWORD
|
||||
#RUN echo root:${ROOT_PASSWORD} | chpasswd
|
||||
|
||||
#RUN sed -i 's/#\?PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
||||
RUN sed -i 's/#\?SyslogFacility AUTH/SyslogFacility AUTH/' /etc/ssh/sshd_config
|
||||
RUN sed -i 's/#\?LogLevel INFO/LogLevel DEBUG/' /etc/ssh/sshd_config
|
||||
|
||||
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
|
||||
|
||||
ENV NOTVISIBLE "in users profile"
|
||||
RUN echo "export VISIBLE=now" >> /etc/profile
|
||||
|
||||
|
||||
COPY rsync_webserver.pub /root/authorized_keys
|
||||
|
||||
RUN mkdir ~/.ssh && \
|
||||
mv ~/authorized_keys ~/.ssh/authorized_keys && \
|
||||
chmod 0600 ~/.ssh/authorized_keys && \
|
||||
chmod 0700 ~/.ssh
|
||||
|
||||
EXPOSE 22
|
||||
|
||||
CMD ["/usr/sbin/sshd", "-D"]
|
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@ -0,0 +1,16 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
ssh:
|
||||
build: .
|
||||
volumes:
|
||||
- ./docs:/var/www/html
|
||||
ports:
|
||||
- '25222:22'
|
||||
server:
|
||||
image: caddy:latest
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- ./docs:/www/html
|
||||
ports:
|
||||
- "8080:80"
|
Loading…
Reference in New Issue
Block a user