# Runtime only — binary built externally via cargo
FROM ubuntu:24.04

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates libssl3 openssh-server git \
    && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /run/sshd && \
    ssh-keygen -A && \
    chmod 755 /etc/ssh

WORKDIR /app
COPY target/x86_64-unknown-linux-gnu/release/gitserver /app/gitserver

ENV APP_LOG_LEVEL=info
ENTRYPOINT ["/app/gitserver"]
