revert Set correct TimeZone conf
This commit is contained in:
ben
2022-12-29 10:36:08 +01:00
parent 988d7f2e26
commit ce0c25cd9e
6 changed files with 30 additions and 64 deletions

View File

@@ -5,22 +5,16 @@ MAINTAINER BeN
RUN apt-get clean && apt-get update && apt-get -y upgrade
RUN apt-get install -y \
openssh-server \
inetutils-syslogd \
sudo
openssh-server
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -rm -d /home/ben -s /bin/bash -g 100 -u 1000 ben && \
echo "ben ALL=NOPASSWD: ALL" > /etc/sudoers.d/ben
#RUN echo 'ben:ben' | chpasswd
RUN useradd -rm -d /home/ben -s /bin/bash -g root -G sudo -u 1000 ben
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config
COPY src/issue.net /etc/issue.net
COPY src/secure.conf /etc/ssh/sshd_config.d/secure.conf
COPY src/start.sh /start.sh
RUN echo 'ben:ben' | chpasswd
RUN service ssh start
EXPOSE 22
#CMD ["/usr/sbin/sshd","-D", "-e"]
CMD ["/start.sh"]
CMD ["/usr/sbin/sshd","-D"]

View File

@@ -1,21 +0,0 @@
IMAGE=openssh
CONTNAME=$(IMAGE)-1
DATAVOLUME=/home/_dockervol/openssh
STARTOPT= \
--hostname bastion \
-e TZ="Europe/Paris" \
-p 22122:22 \
-v $(DATAVOLUME)/homeben:/home/ben \
-v $(DATAVOLUME)/etcssh/ssh_host_ecdsa_key:/etc/ssh/ssh_host_ecdsa_key \
-v $(DATAVOLUME)/etcssh/ssh_host_ecdsa_key.pub:/etc/ssh/ssh_host_ecdsa_key.pub \
-v $(DATAVOLUME)/etcssh/ssh_host_ed25519_key:/etc/ssh/ssh_host_ed25519_key \
-v $(DATAVOLUME)/etcssh/ssh_host_ed25519_key.pub:/etc/ssh/ssh_host_ed25519_key.pub \
-v $(DATAVOLUME)/etcssh/ssh_host_rsa_key:/etc/ssh/ssh_host_rsa_key \
-v $(DATAVOLUME)/etcssh/ssh_host_rsa_key.pub:/etc/ssh/ssh_host_rsa_key.pub \
-v $(DATAVOLUME)/log/ssh.log:/var/log/ssh.log \
-v $(DATAVOLUME)/log/auth.log:/var/log/auth.log \
--name $(CONTNAME) \
$(IMAGE)

View File

@@ -1,13 +1,32 @@
include make.conf
#########################################
#VARIABLES: CAN BE EDITED
#########################################
CONTAINER=test
CONTNAME=$(CONTAINER)-1
DATAVOLUME=$(shell pwd)
#net=host: mandatory for others containers to connect to mysql
STARTOPT=-d \
-p 22122:22 \
--name $(CONTNAME) \
$(CONTAINER)
#########################################
# ACTIONS: DO NOT EDIT BEYOND THIS POINT
#########################################
build:
docker build -t $(IMAGE) .
docker build -t $(CONTAINER) .
build-nocache:
docker build --no-cache -t $(IMAGE) .
docker build --no-cache -t $(CONTAINER) .
run:
docker run -d $(STARTOPT)
docker run $(STARTOPT)
bash:
docker exec -i -t $(CONTNAME) /bin/bash
@@ -22,7 +41,4 @@ clear:
docker rmi -f $(CONTAINER)
install:
docker run -d --restart=always $(STARTOPT)
reinstall:
make stop;make delete ;make install
docker run --restart=always $(STARTOPT)

View File

@@ -1,12 +0,0 @@
* * * * * * * * * * * W A R N I N G * * * * * * * * * * * * *
THIS SYSTEM IS RESTRICTED TO AUTHORIZED USERS FOR AUTHORIZED USE
ONLY. UNAUTHORIZED ACCESS IS STRICTLY PROHIBITED AND MAY BE
PUNISHABLE UNDER THE COMPUTER FRAUD AND ABUSE ACT OF 1986 OR
OTHER APPLICABLE LAWS. IF NOT AUTHORIZED TO ACCESS THIS SYSTEM,
DISCONNECT NOW. BY CONTINUING, YOU CONSENT TO YOUR KEYSTROKES
AND DATA CONTENT BEING MONITORED. ALL PERSONS ARE HEREBY
NOTIFIED THAT THE USE OF THIS SYSTEM CONSTITUTES CONSENT TO
MONITORING AND AUDITING.
################################################################

View File

@@ -1,7 +0,0 @@
PermitRootLogin no
PermitEmptyPasswords no
AllowTcpForwarding yes
MaxStartups 10:30:60
Banner /etc/issue.net
AllowUsers ben
LogLevel VERBOSE

View File

@@ -1,4 +0,0 @@
#!/bin/bash
/usr/sbin/syslogd
/usr/sbin/sshd -D