1
0

Add Docker CLI tools to jump box
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
ci/woodpecker/deployment/woodpecker Pipeline was successful

This commit is contained in:
2026-10-06 20:14:44 +00:00
parent ebc2165b22
commit cea818847a
2 changed files with 8 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ FROM fedora:44
ENV TARGET_USER=garrettmills ENV TARGET_USER=garrettmills
ENV TARGET_UID=1000 ENV TARGET_UID=1000
ENV TARGET_GID=1000 ENV TARGET_GID=1000
ENV DOCKER_RUN_DIR=/run/dind
COPY k8s.repo /etc/yum.repos.d/k8s.repo COPY k8s.repo /etc/yum.repos.d/k8s.repo
COPY startup.bash /usr/sbin/startup.bash COPY startup.bash /usr/sbin/startup.bash
@@ -15,7 +16,8 @@ RUN dnf install -y \
procps-ng rsync screen sudo which autojump hostname jq the_silver_searcher wget \ procps-ng rsync screen sudo which autojump hostname jq the_silver_searcher wget \
coreutils util-linux openssh-server bind-utils kubectl iproute iputils ffmpeg \ coreutils util-linux openssh-server bind-utils kubectl iproute iputils ffmpeg \
&& wget -O /etc/yum.repos.d/kanidm.repo https://download.opensuse.org/repositories/network:/idm/Fedora_44/network:idm.repo \ && wget -O /etc/yum.repos.d/kanidm.repo https://download.opensuse.org/repositories/network:/idm/Fedora_44/network:idm.repo \
&& dnf install -y kanidm-clients \ && wget -O /etc/yum.repos.d/docker-ce.repo https://download.docker.com/linux/fedora/docker-ce.repo \
&& dnf install -y kanidm-clients docker-ce-cli docker-buildx-plugin docker-compose-plugin \
&& dnf clean all -y \ && dnf clean all -y \
&& chmod +x /usr/sbin/startup.bash && chmod +x /usr/sbin/startup.bash

View File

@@ -9,6 +9,11 @@ keys=( /etc/ssh/keys/ssh_host_*_key )
mkdir -p "$(dirname "/etc/ssh/sshd_config.d/10-hostkeys.conf")" mkdir -p "$(dirname "/etc/ssh/sshd_config.d/10-hostkeys.conf")"
printf 'HostKey %s\n' "${keys[@]}" > "/etc/ssh/sshd_config.d/10-hostkeys.conf" printf 'HostKey %s\n' "${keys[@]}" > "/etc/ssh/sshd_config.d/10-hostkeys.conf"
# Setup the DinD socket:
if [ -z DOCKER_RUN_DIR ]; then
ln -s /run/dind/docker.sock /var/run/docker.sock || echo "Failed to symlink Docker socket!"
fi
# Setup the target user and their group # Setup the target user and their group
echo "Setting up target user ${TARGET_USER} (uid=${TARGET_UID}, gid=${TARGET_GID})..." echo "Setting up target user ${TARGET_USER} (uid=${TARGET_UID}, gid=${TARGET_GID})..."
groupadd --gid "$TARGET_GID" "$TARGET_USER" groupadd --gid "$TARGET_GID" "$TARGET_USER"