nginxinc / NGINX-Demos

NGINX and NGINX Plus demos
Apache License 2.0
1.26k stars 670 forks source link

Docker build fails due to the bookwork package not having a release file #102

Closed feargalWag closed 1 year ago

feargalWag commented 1 year ago
➜  nginx-regex-tester git:(master) docker-compose up -d
[+] Building 5.3s (14/17)
 => [internal] load build definition from Dockerfile                                                                                                                              0.0s
 => => transferring dockerfile: 32B                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/nginx:latest                                                                                                                   2.4s
 => [internal] load build context                                                                                                                                                 0.0s
 => => transferring context: 135B                                                                                                                                                 0.0s
 => [ 1/13] FROM docker.io/library/nginx:latest@sha256:593dac25b7733ffb7afe1a72649a43e574778bf025ad60514ef40f6b5d606247                                                           0.0s
 => CACHED [ 2/13] COPY start.sh /usr/local/sbin                                                                                                                                  0.0s
 => CACHED [ 3/13] RUN chmod +x /usr/local/sbin/start.sh                                                                                                                          0.0s
 => CACHED [ 4/13] RUN apt-get update && apt-get install -y -q wget curl apt-transport-https lsb-release ca-certificates gnupg                                                    0.0s
 => CACHED [ 5/13] RUN wget -q -O - http://nginx.org/keys/nginx_signing.key | gpg --dearmor > /usr/share/keyrings/nginx-archive-keyring.gpg                                       0.0s
 => CACHED [ 6/13] RUN rm /etc/nginx/conf.d/*                                                                                                                                     0.0s
 => CACHED [ 7/13] COPY regextester.conf /etc/nginx/conf.d                                                                                                                        0.0s
 => CACHED [ 8/13] RUN printf "deb https://packages.nginx.org/unit/debian/ `lsb_release -cs` unit" > /etc/apt/sources.list.d/unit.list                                            0.0s
 => CACHED [ 9/13] RUN printf "deb-src https://packages.nginx.org/unit/debian/ `lsb_release -cs` unit" >> /etc/apt/sources.list.d/unit.list                                       0.0s
 => ERROR [10/13] RUN apt-get update && apt-get install -y unit php7.0 unit-php                                                                                                   2.7s
------
 > [10/13] RUN apt-get update && apt-get install -y unit php7.0 unit-php:
#0 0.731 Hit:1 http://deb.debian.org/debian bookworm InRelease
#0 0.751 Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
#0 0.785 Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
#0 1.404 Ign:4 https://packages.nginx.org/unit/debian bookworm InRelease
#0 1.581 Err:5 https://packages.nginx.org/unit/debian bookworm Release
#0 1.581   404  Not Found [IP: 3.125.197.172 443]
#0 1.597 Reading package lists...
#0 2.631 E: The repository 'https://packages.nginx.org/unit/debian bookworm Release' does not have a Release file.
------
failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get install -y unit php7.0 unit-php]: exit code: 100
➜  nginx-regex-tester git:(master) ls

I'm getting this error when I try launch the local server via docker locally using docker-compose up -d command.

lucacome commented 1 year ago

@feargalWag looks like unit still hasn't published a package for bookwork

ldeluigi commented 1 year ago

I'm getting a different error:

 => ERROR [10/13] RUN apt-get update && apt-get install -y unit php7.0 un  1.2s
------
 > [10/13] RUN apt-get update && apt-get install -y unit php7.0 unit-php:
#0 0.514 Hit:1 http://deb.debian.org/debian bookworm InRelease
#0 0.528 Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
#0 0.562 Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
#0 0.593 Get:4 https://packages.nginx.org/unit/debian bookworm InRelease [2803 B
]
#0 0.748 Err:4 https://packages.nginx.org/unit/debian bookworm InRelease
#0 0.748   The following signatures couldn't be verified because the public key
is not available: NO_PUBKEY ABF5BD827BD9BF62
#0 0.752 Reading package lists...
#0 1.192 W: GPG error: https://packages.nginx.org/unit/debian bookworm InRelease
: The following signatures couldn't be verified because the public key is not av
ailable: NO_PUBKEY ABF5BD827BD9BF62
#0 1.192 E: The repository 'https://packages.nginx.org/unit/debian bookworm InRe
lease' is not signed.
------
failed to solve: process "/bin/sh -c apt-get update && apt-get install -y unit p
hp7.0 unit-php" did not complete successfully: exit code: 100
ldeluigi commented 1 year ago

Can be monkeypatched with:

RUN apt-get update --allow-insecure-repositories --allow-unauthenticated && apt-get install -y --allow-unauthenticated unit php7.0 unit-php
feargalWag commented 1 year ago

I'm getting a different error:

 => ERROR [10/13] RUN apt-get update && apt-get install -y unit php7.0 un  1.2s
------
 > [10/13] RUN apt-get update && apt-get install -y unit php7.0 unit-php:
#0 0.514 Hit:1 http://deb.debian.org/debian bookworm InRelease
#0 0.528 Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
#0 0.562 Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
#0 0.593 Get:4 https://packages.nginx.org/unit/debian bookworm InRelease [2803 B
]
#0 0.748 Err:4 https://packages.nginx.org/unit/debian bookworm InRelease
#0 0.748   The following signatures couldn't be verified because the public key
is not available: NO_PUBKEY ABF5BD827BD9BF62
#0 0.752 Reading package lists...
#0 1.192 W: GPG error: https://packages.nginx.org/unit/debian bookworm InRelease
: The following signatures couldn't be verified because the public key is not av
ailable: NO_PUBKEY ABF5BD827BD9BF62
#0 1.192 E: The repository 'https://packages.nginx.org/unit/debian bookworm InRe
lease' is not signed.
------
failed to solve: process "/bin/sh -c apt-get update && apt-get install -y unit p
hp7.0 unit-php" did not complete successfully: exit code: 100

This fixed an error similar to the one above for me: RUN wget -qO - https://nginx.org/keys/nginx_signing.key | apt-key add -

feargalWag commented 1 year ago

This thing should really just be deployed somewhere instead of everyone needing to spin it up locally