confidential-containers/demos/ssh-demo/Dockerfile
Jakob Naucke 8c3a47ab67 Add SSH demo
Add basic documentation, Dockerfile, k8s and sandbox config for a demo
pod with SSH public key authentication.

Documentation on encrypting and running the image is omitted as of now,
for this is a more general topic which will require separate attention.

Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-11-24 07:11:28 +01:00

10 lines
428 B
Docker

FROM alpine:3.14
RUN apk update && apk upgrade && apk add openssh-server
RUN ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -P ""
# A password needs to be set for login to work. An empty password is
# unproblematic as password-based login to root is not allowed.
RUN passwd -d root
# Generate with `ssh-keygen -t ed25519 -f ccv0-ssh -P "" -C ""`
COPY ccv0-ssh.pub /root/.ssh/authorized_keys
ENTRYPOINT /usr/sbin/sshd -D