zabbix/zabbix-docker

In nginx containers, please remove nginx repo after building it

fpaternot opened this issue · 3 comments

SUMMARY

When building on top of zabbix official docker images, in nginx-mysql containers we get an error for nginx repository. Thats no longer needed as it was installed already. I want to be able not to worry about nginx repository in the container and install any other packages i may need.

OS / ENVIRONMENT / Used docker-compose files
CONFIGURATION
STEPS TO REPRODUCE
# [STAGING] docker run -ti -e https_proxy=http://proxy.domain.com:3128 -e http_proxy=http://proxy.domain.com:3128 --user root --entrypoint bash zabbix/zabbix-web-nginx-mysql:ubuntu-6.4.14
root@a4b1504f7333:/usr/share/zabbix# apt update
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Get:3 https://nginx.org/packages/ubuntu jammy InRelease [3590 B]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Err:3 https://nginx.org/packages/ubuntu jammy InRelease
  The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com>
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1974 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.7 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [2566 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1114 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2238 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [2639 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1398 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [51.8 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [32.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [81.0 kB]
Reading package lists... Done
W: GPG error: https://nginx.org/packages/ubuntu jammy InRelease: The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key <signing-key@nginx.com>
E: The repository 'https://nginx.org/packages/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@a4b1504f7333:/usr/share/zabbix# find /etc/apt -name '*nginx*' -delete
root@a4b1504f7333:/usr/share/zabbix# apt update
Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
22 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@a4b1504f7333:/usr/share/zabbix#
EXPECTED RESULTS

I expect to use apt update without errors on the first run.

ACTUAL RESULTS

W: GPG error: https://nginx.org/packages/ubuntu jammy InRelease: The following signatures were invalid: EXPKEYSIG ABF5BD827BD9BF62 nginx signing key signing-key@nginx.com
E: The repository 'https://nginx.org/packages/ubuntu jammy InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

apt update
find /etc/apt -name '*nginx*' -delete
apt update

Looks like the problem related to 6.4.14 version. Can you try latest one?

% docker run -ti  --user root --entrypoint bash zabbix/zabbix-web-nginx-mysql:ubuntu-6.4.16
Unable to find image 'zabbix/zabbix-web-nginx-mysql:ubuntu-6.4.16' locally
ubuntu-6.4.16: Pulling from zabbix/zabbix-web-nginx-mysql
9b10a938e284: Pull complete 
f55744ea93d5: Pull complete 
468a436da8c7: Pull complete 
251c1f9a5c22: Pull complete 
4f4fb700ef54: Pull complete 
d76c2b4edd37: Pull complete 
Digest: sha256:b783dc786310fb33756616cf76bb58d7ce53668a00a6802d91cbffeb69f043a0
Status: Downloaded newer image for zabbix/zabbix-web-nginx-mysql:ubuntu-6.4.16
root@9cba058168f7:/usr/share/zabbix# apt update
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease [270 kB]
Get:2 https://nginx.org/packages/ubuntu jammy InRelease [3590 B]          
Get:3 https://nginx.org/packages/ubuntu jammy/nginx arm64 Packages [21.6 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease [128 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease [127 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease [129 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports jammy/universe arm64 Packages [17.2 MB]
Get:8 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 Packages [1758 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports jammy/restricted arm64 Packages [24.2 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports jammy/multiverse arm64 Packages [224 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 Packages [1329 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 Packages [1930 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports jammy-updates/multiverse arm64 Packages [29.5 kB]                                                                                                                                                                                                                                                                                                                                           
Get:14 http://ports.ubuntu.com/ubuntu-ports jammy-updates/restricted arm64 Packages [1985 kB]                                                                                                                                                                                                                                                                                                                                           
Get:15 http://ports.ubuntu.com/ubuntu-ports jammy-backports/universe arm64 Packages [30.3 kB]                                                                                                                                                                                                                                                                                                                                           
Get:16 http://ports.ubuntu.com/ubuntu-ports jammy-backports/main arm64 Packages [80.6 kB]                                                                                                                                                                                                                                                                                                                                               
Get:17 http://ports.ubuntu.com/ubuntu-ports jammy-security/universe arm64 Packages [1051 kB]                                                                                                                                                                                                                                                                                                                                            
Get:18 http://ports.ubuntu.com/ubuntu-ports jammy-security/multiverse arm64 Packages [24.1 kB]                                                                                                                                                                                                                                                                                                                                          
Get:19 http://ports.ubuntu.com/ubuntu-ports jammy-security/main arm64 Packages [1670 kB]                                                                                                                                                                                                                                                                                                                                                
Get:20 http://ports.ubuntu.com/ubuntu-ports jammy-security/restricted arm64 Packages [1919 kB]                                                                                                                                                                                                                                                                                                                                          
Fetched 29.9 MB in 10s (3131 kB/s)                                                                                                                                                                                                                                                                                                                                                                                                      
Reading package lists... Done
root@9cba058168f7:/usr/share/zabbix# 

Also, 7.0 does not contain custom repo anymore.

Hmm, indeed. Looks good to me then, sorry for missing it in the first post.