mirror of
https://github.com/ghndrx/shellmate.git
synced 2026-02-10 23:04:59 +00:00
Persist SSH host key across restarts
- Remove key generation from Dockerfile (was causing new key each build) - Add ssh_keys volume mount in docker-compose - Generate key at runtime only if it doesn't exist - No more clearing known_hosts after updates!
This commit is contained in:
@@ -20,12 +20,10 @@ 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 22
|
||||
|
||||
# Key is generated at runtime (see entrypoint) or mounted from volume
|
||||
|
||||
ENV STOCKFISH_PATH=/usr/games/stockfish
|
||||
|
||||
CMD ["shellmate-server"]
|
||||
|
||||
Reference in New Issue
Block a user