Skip to content

Please add openssh-keygen to Dockerfile-rootless #33783

Open
@p7kdev

Description

@p7kdev

Feature Description

Hi,

I prefer the rootless container variant and use the built-in SSH server. This works perfectly so far. I only have the problem of the initial installation and the generation of the SSH host keys, because there is no tool in the rootless image to generate the keys. I am aware that an RSA key is created automatically. But the others (ecdsa, ed25519) are not.

I run this in K8s. At the moment I'm helping myself by having an initContainer (the rootfull variant), which then generates the keys with openssh-keygen. But that feels like overkill to define an extra image just for that instead of using the same rootless image. It would be much more convenient if the openssh-keygen tool was also available in the rootless container. It only adds a few KB, but really makes your life easier.

af2800d5c2df:/var/lib/gitea# apk add openssh-keygen -i
The following NEW packages will be installed:
  openssh-keygen
Need to download 202 KiB of packages.
After this operation, 470 KiB of additional disk space will be used.

The official helm chart uses the rootfull variant by default. There is also a flag to use the rootless variant. In this case, however, only the RSA key seems to be created and used. That feels incomplete.

Thanks already!

Best regards,
Paul

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/buildPR changes how Gitea is built, i.e. regarding Docker or the Makefiletype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions