Spaces:
Paused
Paused
File size: 1,257 Bytes
a737e90 0f21a36 a737e90 0f21a36 a737e90 0f21a36 a737e90 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | FROM debian:bookworm-slim
# 必要なパッケージのインストールとTailscaleリポジトリの追加
RUN apt-get update && apt-get install -y \
curl \
gnupg \
lsb-release \
openssh-server \
sudo \
python3 \
&& curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null \
&& curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | tee /etc/apt/sources.list.d/tailscale.list \
&& apt-get update && apt-get install -y tailscale \
&& rm -rf /var/lib/apt/lists/*
# SSHサーバーの設定
RUN mkdir /var/run/sshd && \
sed -i 's/#Port 22/Port 2222/' /etc/ssh/sshd_config && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
# SSHログイン用パスワードの設定
RUN echo 'root:noppo-ssh-pass' | chpasswd
# 起動スクリプトのコピーと権限付与
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# HFがWebサーバーとして認識するために必要なポート(ダミー)
EXPOSE 7860
ENTRYPOINT ["/entrypoint.sh"] |