mirror of
https://github.com/ghndrx/shellmate.git
synced 2026-02-10 06:45:02 +00:00
32 lines
668 B
Docker
32 lines
668 B
Docker
FROM python:3.12-slim
|
|
|
|
# Install Stockfish
|
|
RUN apt-get update && apt-get install -y \
|
|
stockfish \
|
|
openssh-client \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy everything needed for install
|
|
COPY pyproject.toml README.md ./
|
|
COPY src/ src/
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir .
|
|
|
|
# Create user and directories
|
|
RUN useradd -m shellmate && \
|
|
mkdir -p /etc/shellmate && \
|
|
chown shellmate:shellmate /etc/shellmate
|
|
|
|
# Switch to shellmate user and generate SSH key
|
|
USER shellmate
|
|
RUN ssh-keygen -t ed25519 -f /etc/shellmate/ssh_host_key -N ""
|
|
|
|
EXPOSE 2222
|
|
|
|
ENV STOCKFISH_PATH=/usr/games/stockfish
|
|
|
|
CMD ["shellmate-server"]
|