fedora-jumphost
1.3K
jumphostest container based on fedora 41 with all commands needed for typical Linux administration
docker run -d \
--name=fedora-jumphost \
--hostname=fedora-jumphost \
-p 10.77.11.106:22:22 \
-e PUBLIC_SSH_KEY="ssh-rsa......." \
-e StorageNFS="IP:/SHARE"
--restart unless-stopped \
--privileged \
pkoperwas/fedora-jumphost
FROM fedora:latest
LABEL org.opencontainers.image.authors="pkoperwas"
RUN dnf update -y && \
dnf install -y podman podman-docker skopeo ansible corkscrew ntpsec smem aide dmidecode ltrace iperf wireguard-tools bat iproute openssh-server procps-ng openssh-clients iputils wget mc rsync bc sysstat tcpdump lsof unzip nc vim telnet helm dnf-utils bzip2 bind-utils dstat net-tools nmap pwgen mtr htop numactl pcp bash-completion ncdu dos2unix git nfs-utils samba-client cifs-utils iscsi-initiator-utils screen tmux iotop atop dnf-automatic perl python3-pip sg3_utils nload glances xterm nethogs rpmconf aria2 jq httpie openssh-clients postfix xorg-x11-xauth hdparm chrony device-mapper-multipath fio genisoimage iptraf-ng isomd5sum openscap openscap-scanner perf pykickstart scap-security-guide selinux-policy-devel strace sudo kubectl fastfetch && \
ssh-keygen -A && \
dnf clean all
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 22
ENTRYPOINT ["/entrypoint.sh"]
#!/bin/bash
# authorized_keys
mkdir -p /root/.ssh
chmod 700 /root/.ssh
if [ -n "$PUBLIC_SSH_KEY" ]; then
echo "Adding pub key /root/.ssh/authorized_keys"
echo "$PUBLIC_SSH_KEY" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
else
echo "Public SSH Key not defined. Skiping"
fi
# NFS Storage
if [ -n "$StorageNFS" ]; then
echo "Mounting NFS: $StorageNFS"
mkdir -p /root/StorageNFS
mount -t nfs "$StorageNFS" /root/StorageNFS
if [ $? -eq 0 ]; then
echo "NFS mounted succesfully to /root/StorageNFS"
else
echo "Error while NFS mounting"
fi
else
echo "StorageNFS is not defined. Skiping"
fi
# Customization File (settings priv aliases etc
CUSTOMIZATION="/root/StorageNFS/priv-settings/customization/customization.sh"
if [ -f "$CUSTOMIZATION" ]; then
/bin/bash "$CUSTOMIZATION"
fi
# SSHD
echo "Starting sshd..."
/usr/sbin/sshd -D -e 2>&1 | while read line; do printf '[%s] %s\n' "$(date '+%Y-%m-%d %H:%M:%S')" "$line"; done
Content type
Image
Digest
sha256:b49ab2c7d…
Size
772.4 MB
Last updated
almost 2 years ago
docker pull pkoperwas/fedora-jumphost