Files
GPU-Node/ssh/Dockerfile
Operator 61a62e658a win
2026-10-17 10:40:52 +00:00

55 lines
1.2 KiB
Docker

FROM alpine:3.22
RUN apk add --no-cache \
openssh-server \
docker-cli \
docker-cli-compose \
git \
curl \
wget \
bash \
jq \
vim \
less \
htop \
nano \
iproute2 \
bind-tools \
tcpdump \
procps \
util-linux \
tree \
file \
ca-certificates \
tzdata \
&& addgroup -g 1001 docker-host \
&& adduser -D -s /bin/bash operator \
&& adduser operator docker-host \
&& passwd -d operator \
&& mkdir -p /home/operator/.ssh \
&& ssh-keygen -A
RUN printf '%s\n' \
'PasswordAuthentication no' \
'KbdInteractiveAuthentication no' \
'PubkeyAuthentication yes' \
'PermitRootLogin no' \
>> /etc/ssh/sshd_config
COPY entrypoint.sh /entrypoint.sh
COPY gpuctl /usr/local/bin/gpuctl
COPY scripts/ /usr/local/lib/scripts/
RUN sed -i 's/\r$//' \
/entrypoint.sh \
/usr/local/bin/gpuctl \
/usr/local/lib/scripts/*.sh \
&& chmod +x \
/entrypoint.sh \
/usr/local/bin/gpuctl \
/usr/local/lib/scripts/*.sh
EXPOSE 22
ENTRYPOINT ["/entrypoint.sh"]