hosting the jump creating users
All checks were successful
Build OCI Containers / Build Containers (push) Successful in 1m33s
All checks were successful
Build OCI Containers / Build Containers (push) Successful in 1m33s
This commit is contained in:
parent
c019be6dc7
commit
e2bc0a9ba9
@ -1,5 +1,6 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
COPY create_users.sh /create_users.sh
|
||||
COPY start_sshd.sh /start_sshd.sh
|
||||
COPY supervisord.conf /etc/supervisord.conf
|
||||
|
||||
@ -10,7 +11,7 @@ RUN apt-get update && \
|
||||
apt-get -y clean && \
|
||||
touch /var/log/supervisord.log && \
|
||||
mkdir /var/run/sshd && \
|
||||
chmod a+x /start_sshd.sh
|
||||
chmod a+x /*.sh
|
||||
|
||||
EXPOSE 22/tcp
|
||||
|
||||
|
||||
7
jumphost/create_users.sh
Normal file
7
jumphost/create_users.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
for user in /jumphost_users/*; do
|
||||
uid=`cat /jumphost_users/${user}
|
||||
/usr/sbin/groupadd -g ${uid} ${user}
|
||||
/usr/sbin/useradd -d /home/${user} -m -s /bin/bash -u ${uid} -g ${uid} ${user}
|
||||
done
|
||||
@ -3,7 +3,13 @@ nodaemon=true
|
||||
childlogdir=/var/log
|
||||
logfile=/var/log/supervisord.log
|
||||
|
||||
[program:create_users]
|
||||
command=/create_users.sh
|
||||
startsecs=0
|
||||
autorestart=false
|
||||
startretries=1
|
||||
|
||||
[program:sshd]
|
||||
command=/entry/start_sshd.sh
|
||||
command=/start_sshd.sh
|
||||
stdout_logfile=/var/log/sshd.log
|
||||
redirect_stderr=true
|
||||
Loading…
Reference in New Issue
Block a user