Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx regex-tester docker does not build due to missing gpg key #96

Open
mathijswesterhof opened this issue May 3, 2023 · 1 comment

Comments

@mathijswesterhof
Copy link
Contributor

...
 => [ 9/13] RUN printf "deb-src https://packages.nginx.org/unit/debian/ `  0.6s
 => ERROR [10/13] RUN apt-get update && apt-get install -y unit php7.0 un  1.7s
------
 > [10/13] RUN apt-get update && apt-get install -y unit php7.0 unit-php:
#0 0.605 Hit:1 http://deb.debian.org/debian bullseye InRelease
#0 0.605 Hit:2 http://deb.debian.org/debian-security bullseye-security InRelease
#0 0.605 Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
#0 0.782 Get:4 https://packages.nginx.org/unit/debian bullseye InRelease [2815 B]
#0 1.137 Err:4 https://packages.nginx.org/unit/debian bullseye InRelease
#0 1.137   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62
#0 1.143 Reading package lists...
#0 1.701 W: GPG error: https://packages.nginx.org/unit/debian bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62
#0 1.701 E: The repository 'https://packages.nginx.org/unit/debian bullseye InRelease' is not signed.
------
failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get install -y unit php7.0 unit-php]: exit code: 100

When pulling master and running the docker-compose up -d command the build tries to pull a repository that does not have the correct key.
this can be fixed by adding the key

RUN wget -q -O - https://unit.nginx.org/keys/nginx-keyring.gpg | gpg --dearmor > /usr/share/keyrings/nginx-keyring.gpg

and modifying the print statements to

RUN printf "deb [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/debian/ `lsb_release -cs` unit" > /etc/apt/sources.list.d/unit.list
RUN printf "deb-src [signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://packages.nginx.org/unit/debian/ `lsb_release -cs` unit" >> /etc/apt/sources.list.d/unit.list
@mathijswesterhof
Copy link
Contributor Author

A pull request has been set for this issue #97 . I have however no clue how to assign or request a review. or how to properly put labels on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant