Spaces:
Paused
Paused
| 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"] |