win
This commit is contained in:
@@ -1,31 +1,55 @@
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN apk add --no-cache \
|
||||
openssh-server \
|
||||
docker-cli \
|
||||
docker-cli-compose \
|
||||
&& addgroup -g 1001 docker-host \
|
||||
&& adduser -D -s /bin/sh 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
|
||||
|
||||
RUN sed -i 's/\r$//' /usr/local/bin/gpuctl \
|
||||
&& chmod +x /entrypoint.sh /usr/local/bin/gpuctl
|
||||
|
||||
RUN chmod +x /entrypoint.sh /usr/local/bin/gpuctl
|
||||
|
||||
EXPOSE 22
|
||||
|
||||
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"]
|
||||
Reference in New Issue
Block a user