[Discussion] Gnupg to docker image to allow blocking unsigned commits on pre-receive-hook #1993

Closed
opened 2025-11-02 04:20:29 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @sphrak on GitHub (Jun 30, 2018).

Hello everyone,
Was about to add this pre-receive hook to my repository in gitea in order to block non-signed commits. However it failed and I found out the gnupg package wasnt included in the docker build.

Now this does not come without a cost of course to install the gnupg package costs us 54MB which is quite a lot considering the whole gitea image weighs in at just shy of ~75MB.

So I mainly started this issue to discuss if it would be:

  • Possible to have gnupg package added to Dockerfile?
  • If not are there other creative solutions/alternative libraries to circumvent this "limitation"?

.. Or should I simply just manually install it and call it a day?

Kindly,
sphrak

Originally created by @sphrak on GitHub (Jun 30, 2018). Hello everyone, Was about to add [this](https://github.com/github/platform-samples/blob/master/pre-receive-hooks/block_unsigned_commits.sh) `pre-receive` hook to my repository in gitea in order to block non-signed commits. However it failed and I found out the gnupg package wasnt included in the docker build. Now this does not come without a cost of course to install the gnupg package costs us `54MB` which is quite a lot considering the whole gitea image weighs in at just shy of ~`75MB`. So I mainly started this issue to discuss if it would be: * Possible to have `gnupg` package added to Dockerfile? * If not are there other creative solutions/alternative libraries to circumvent this "limitation"? .. Or should I simply just manually install it and call it a day? Kindly, sphrak
Author
Owner

@lafriks commented on GitHub (Jun 30, 2018):

You can just create new dockerfile based in gitea and just add gnupg package

@lafriks commented on GitHub (Jun 30, 2018): You can just create new dockerfile based in gitea and just add gnupg package
Author
Owner

@sphrak commented on GitHub (Jun 30, 2018):

Yes thats one option.

@sphrak commented on GitHub (Jun 30, 2018): Yes thats one option.
Author
Owner

@jonasfranz commented on GitHub (Jun 30, 2018):

FROM gitea/gitea:1.4
RUN apk --no-cache add gnupg
@jonasfranz commented on GitHub (Jun 30, 2018): ```Dockerfile FROM gitea/gitea:1.4 RUN apk --no-cache add gnupg ```
Author
Owner

@techknowlogick commented on GitHub (Jul 4, 2018):

Closing this as hopefully we will have this feature baked into Gitea. See #4249 As a workaround @JonasFranzDEV option will likely work for you.

@techknowlogick commented on GitHub (Jul 4, 2018): Closing this as hopefully we will have this feature baked into Gitea. See #4249 As a workaround @JonasFranzDEV option will likely work for you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1993