Files
envbao-admin/docker/sshd/Dockerfile
T
mattandClaude Sonnet 5.5 11c9483a88 Demo and CI: Postgres and SSH server for the dynamic engines
docker compose now runs a Postgres with sample tables and an SSH server
that trusts the CA in OpenBao's ssh/ engine. seed.sh configures the
database engine (dynamic and static roles), the ssh CA and a role, a few
live leases, and grants for alice and the platform group. CI gains a
Postgres service so the database engine and its admin-policy rules are
tested against a real database (skipped when BAO_PG_URL is unset).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 13:58:59 +00:00

22 lines
860 B
Docker

# A tiny SSH server for the docker-compose demo. It trusts certificates signed by the CA in OpenBao's ssh/
# engine: the entrypoint fetches the CA public key from OpenBao at start-up. Throwaway; not hardened for real use.
FROM alpine:3.22
RUN apk add --no-cache openssh-server curl \
&& ssh-keygen -A \
&& for u in deploy alice; do \
adduser -D -s /bin/sh "$u" \
# sshd refuses locked accounts even for key logins, so give each a random password (password logins are off).
&& echo "$u:$(head -c 24 /dev/urandom | base64)" | chpasswd; \
done
COPY sshd_config /etc/ssh/sshd_config
COPY sample-data/deploy/ /home/deploy/
COPY sample-data/alice/ /home/alice/
RUN chown -R deploy:deploy /home/deploy && chown -R alice:alice /home/alice
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 22
ENTRYPOINT ["/entrypoint.sh"]