Skip to content

running apt update -y && apt upgrade -y fails on mcr.microsoft.com/mssql/server:2025-latest #952

@mprins

Description

@mprins

in a customized build using FROM mcr.microsoft.com/mssql/server:2025-latest having a RUN command that has apt update -y && apt upgrade -y currently fails with the log below.
See PR: Tailormap/tailormap-data#111 for the Dockerfile

Does the microsoft-prod.gpg in the base image need updating/replacing?

└─ $ ▶ docker compose -f ./docker-compose.yml build --pull --compress --no-cache sqlserver                                                                                                                                                   
[+] Building 9.8s (8/8) FINISHED                                                                                                                                                                                                             
 => [internal] load local bake definitions                                                                                                                                                                                              0.0s
 => => reading from stdin 651B                                                                                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                    0.0s 
 => => transferring dockerfile: 1.27kB                                                                                                                                                                                                  0.0s 
 => [internal] load metadata for mcr.microsoft.com/mssql/server:2025-latest                                                                                                                                                             0.1s 
 => [internal] load .dockerignore                                                                                                                                                                                                       0.0s 
 => => transferring context: 2B                                                                                                                                                                                                         0.0s 
 => [internal] load build context                                                                                                                                                                                                       0.0s 
 => => transferring context: 366B                                                                                                                                                                                                       0.0s 
 => CACHED [1/3] FROM mcr.microsoft.com/mssql/server:2025-latest@sha256:5ffdffd2ba852051c2fc2f5b310391bf896dbaf8d16cc026a3c859d6214b30d1                                                                                                0.0s 
 => [2/3] COPY ./docker-entrypoint-initdb.d /docker-entrypoint-initdb.d                                                                                                                                                                 0.1s 
 => ERROR [3/3] RUN ln -snf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime && echo Europe/Amsterdam > /etc/timezone     && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8     && sed -i 's/# en_US.  9.6s 
------                                                                                                                                                                                                                                       
 > [3/3] RUN ln -snf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime && echo Europe/Amsterdam > /etc/timezone     && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8     && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen "en_US.UTF-8"     && apt update -y && apt upgrade -y && apt autoremove -y && apt autoclean && apt clean     && rm -rf /tmp/* && rm -rf /var/tmp/* && rm -rf /var/lib/apt/lists/*     && chmod +r /docker-entrypoint-initdb.d/geodata.backup.dump:                                                                                                                                                                                         
0.967 Generating locales (this might take a while)...                                                                                                                                                                                        
0.969   en_US.UTF-8... done                                                                                                                                                                                                                  
1.780 Generation complete.
1.800 
1.800 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
1.800 
1.867 Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]
1.888 Get:2 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3,600 B]
1.899 Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
1.911 Get:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
1.922 Get:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
1.951 Get:6 https://packages.microsoft.com/ubuntu/24.04/prod noble/main armhf Packages [11.4 kB]
1.964 Get:7 https://packages.microsoft.com/ubuntu/24.04/prod noble/main arm64 Packages [76.5 kB]
1.968 Get:8 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 Packages [97.6 kB]
1.970 Get:9 https://packages.microsoft.com/ubuntu/24.04/prod noble/main all Packages [643 B]
2.001 Get:10 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1,808 kB]
2.078 Get:11 http://archive.ubuntu.com/ubuntu noble/multiverse amd64 Packages [331 kB]
2.090 Get:12 http://archive.ubuntu.com/ubuntu noble/restricted amd64 Packages [117 kB]
2.094 Get:13 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB]
2.146 Get:14 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [34.8 kB]
2.188 Get:15 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1,242 kB]
2.403 Get:16 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [3,262 kB]
2.692 Get:17 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1,883 kB]
3.083 Get:18 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [38.1 kB]
3.083 Get:19 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [2,276 kB]
3.168 Get:20 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [3,471 kB]
3.300 Get:21 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [2,017 kB]
3.377 Get:22 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [34.6 kB]
3.378 Get:23 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [49.5 kB]
3.690 Fetched 36.7 MB in 2s (19.9 MB/s)
3.690 Reading package lists...
4.322 Building dependency tree...
4.475 Reading state information...
4.505 17 packages can be upgraded. Run 'apt list --upgradable' to see them.
4.510 
4.510 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
4.510 
4.514 Reading package lists...
5.108 Building dependency tree...
5.256 Reading state information...
5.305 Calculating upgrade...
5.538 The following packages will be upgraded:
5.538   base-files gcc-14-base libatomic1 libcurl3t64-gnutls libexpat1 libgcc-s1
5.538   libglib2.0-0t64 libglib2.0-data libgnutls30t64 libpython3.12-minimal
5.539   libpython3.12-stdlib libpython3.12t64 libssh-4 libstdc++6
5.539   packages-microsoft-prod python3.12 python3.12-minimal
5.627 17 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5.627 Need to get 12.5 MB of archives.
5.627 After this operation, 15.4 kB of additional disk space will be used.
5.627 Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 base-files amd64 13ubuntu10.4 [73.3 kB]
5.709 Get:2 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libexpat1 amd64 2.6.1-2ubuntu0.4 [88.2 kB]
5.735 Get:3 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libpython3.12t64 amd64 3.12.3-1ubuntu0.11 [2,345 kB]
5.899 Get:4 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 python3.12 amd64 3.12.3-1ubuntu0.11 [651 kB]
5.907 Get:5 https://packages.microsoft.com/ubuntu/24.04/prod noble/main all packages-microsoft-prod all 1.2-ubuntu24.04 [4,288 B]
5.966 Get:6 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libpython3.12-stdlib amd64 3.12.3-1ubuntu0.11 [2,069 kB]
6.003 Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 python3.12-minimal amd64 3.12.3-1ubuntu0.11 [2,342 kB]
6.098 Get:8 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libpython3.12-minimal amd64 3.12.3-1ubuntu0.11 [837 kB]
6.130 Get:9 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libatomic1 amd64 14.2.0-4ubuntu2~24.04.1 [10.5 kB]
6.130 Get:10 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 gcc-14-base amd64 14.2.0-4ubuntu2~24.04.1 [51.0 kB]
6.132 Get:11 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libstdc++6 amd64 14.2.0-4ubuntu2~24.04.1 [792 kB]
6.163 Get:12 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgcc-s1 amd64 14.2.0-4ubuntu2~24.04.1 [78.4 kB]
6.165 Get:13 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libgnutls30t64 amd64 3.8.3-1.1ubuntu3.5 [1,001 kB]
6.203 Get:14 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libglib2.0-0t64 amd64 2.80.0-6ubuntu3.8 [1,545 kB]
6.262 Get:15 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libglib2.0-data all 2.80.0-6ubuntu3.8 [49.6 kB]
6.264 Get:16 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libssh-4 amd64 0.10.6-2ubuntu0.3 [190 kB]
6.271 Get:17 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libcurl3t64-gnutls amd64 8.5.0-2ubuntu10.7 [334 kB]
6.403 debconf: delaying package configuration, since apt-utils is not installed
6.438 Fetched 12.5 MB in 1s (17.1 MB/s)
(Reading database ... 8480 files and directories currently installed.)
6.485 Preparing to unpack .../base-files_13ubuntu10.4_amd64.deb ...
6.520 Unpacking base-files (13ubuntu10.4) over (13ubuntu10.3) ...
6.619 Setting up base-files (13ubuntu10.4) ...
6.625 Installing new version of config file /etc/issue ...
6.626 Installing new version of config file /etc/issue.net ...
6.630 Installing new version of config file /etc/lsb-release ...
(Reading database ... 8480 files and directories currently installed.)
6.750 Preparing to unpack .../0-libexpat1_2.6.1-2ubuntu0.4_amd64.deb ...
6.755 Unpacking libexpat1:amd64 (2.6.1-2ubuntu0.4) over (2.6.1-2ubuntu0.3) ...
6.783 Preparing to unpack .../1-libpython3.12t64_3.12.3-1ubuntu0.11_amd64.deb ...
6.787 Unpacking libpython3.12t64:amd64 (3.12.3-1ubuntu0.11) over (3.12.3-1ubuntu0.10) ...
6.855 Preparing to unpack .../2-python3.12_3.12.3-1ubuntu0.11_amd64.deb ...
6.959 Unpacking python3.12 (3.12.3-1ubuntu0.11) over (3.12.3-1ubuntu0.10) ...
6.992 Preparing to unpack .../3-libpython3.12-stdlib_3.12.3-1ubuntu0.11_amd64.deb ...
7.029 Unpacking libpython3.12-stdlib:amd64 (3.12.3-1ubuntu0.11) over (3.12.3-1ubuntu0.10) ...
7.453 Preparing to unpack .../4-python3.12-minimal_3.12.3-1ubuntu0.11_amd64.deb ...
7.462 Unpacking python3.12-minimal (3.12.3-1ubuntu0.11) over (3.12.3-1ubuntu0.10) ...
7.534 Preparing to unpack .../5-libpython3.12-minimal_3.12.3-1ubuntu0.11_amd64.deb ...
7.601 Unpacking libpython3.12-minimal:amd64 (3.12.3-1ubuntu0.11) over (3.12.3-1ubuntu0.10) ...
7.946 Preparing to unpack .../6-libatomic1_14.2.0-4ubuntu2~24.04.1_amd64.deb ...
7.950 Unpacking libatomic1:amd64 (14.2.0-4ubuntu2~24.04.1) over (14.2.0-4ubuntu2~24.04) ...
7.973 Preparing to unpack .../7-gcc-14-base_14.2.0-4ubuntu2~24.04.1_amd64.deb ...
7.978 Unpacking gcc-14-base:amd64 (14.2.0-4ubuntu2~24.04.1) over (14.2.0-4ubuntu2~24.04) ...
8.002 Setting up gcc-14-base:amd64 (14.2.0-4ubuntu2~24.04.1) ...
(Reading database ... 8480 files and directories currently installed.)
8.031 Preparing to unpack .../libstdc++6_14.2.0-4ubuntu2~24.04.1_amd64.deb ...
8.047 Unpacking libstdc++6:amd64 (14.2.0-4ubuntu2~24.04.1) over (14.2.0-4ubuntu2~24.04) ...
8.098 Setting up libstdc++6:amd64 (14.2.0-4ubuntu2~24.04.1) ...
(Reading database ... 8480 files and directories currently installed.)
8.125 Preparing to unpack .../libgcc-s1_14.2.0-4ubuntu2~24.04.1_amd64.deb ...
8.129 Unpacking libgcc-s1:amd64 (14.2.0-4ubuntu2~24.04.1) over (14.2.0-4ubuntu2~24.04) ...
8.154 Setting up libgcc-s1:amd64 (14.2.0-4ubuntu2~24.04.1) ...
(Reading database ... 8480 files and directories currently installed.)
8.186 Preparing to unpack .../libgnutls30t64_3.8.3-1.1ubuntu3.5_amd64.deb ...
8.190 Unpacking libgnutls30t64:amd64 (3.8.3-1.1ubuntu3.5) over (3.8.3-1.1ubuntu3.4) ...
8.228 Setting up libgnutls30t64:amd64 (3.8.3-1.1ubuntu3.5) ...
(Reading database ... 8480 files and directories currently installed.)
8.258 Preparing to unpack .../libglib2.0-0t64_2.80.0-6ubuntu3.8_amd64.deb ...
8.267 Unpacking libglib2.0-0t64:amd64 (2.80.0-6ubuntu3.8) over (2.80.0-6ubuntu3.7) ...
8.324 Preparing to unpack .../libglib2.0-data_2.80.0-6ubuntu3.8_all.deb ...
8.328 Unpacking libglib2.0-data (2.80.0-6ubuntu3.8) over (2.80.0-6ubuntu3.7) ...
8.351 Preparing to unpack .../libssh-4_0.10.6-2ubuntu0.3_amd64.deb ...
8.355 Unpacking libssh-4:amd64 (0.10.6-2ubuntu0.3) over (0.10.6-2ubuntu0.2) ...
8.386 Preparing to unpack .../libcurl3t64-gnutls_8.5.0-2ubuntu10.7_amd64.deb ...
8.390 Unpacking libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.7) over (8.5.0-2ubuntu10.6) ...
8.421 Preparing to unpack .../packages-microsoft-prod_1.2-ubuntu24.04_all.deb ...
8.429 Unpacking packages-microsoft-prod (1.2-ubuntu24.04) over (1.1-ubuntu24.04) ...
8.468 Setting up libexpat1:amd64 (2.6.1-2ubuntu0.4) ...
8.473 Setting up packages-microsoft-prod (1.2-ubuntu24.04) ...
8.477 
8.477 Configuration file '/usr/share/keyrings/microsoft-prod.gpg'
8.477  ==> Deleted (by you or by a script) since installation.
8.477  ==> Package distributor has shipped an updated version.
8.477    What would you like to do about it ?  Your options are:
8.477     Y or I  : install the package maintainer's version
8.477     N or O  : keep your currently-installed version
8.477       D     : show the differences between the versions
8.477       Z     : start a shell to examine the situation
8.477  The default action is to keep your current version.
8.477 *** microsoft-prod.gpg (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package packages-microsoft-prod (--configure):
8.477  end of file on stdin at conffile prompt
8.477 Setting up libpython3.12-minimal:amd64 (3.12.3-1ubuntu0.11) ...
8.484 Setting up libglib2.0-0t64:amd64 (2.80.0-6ubuntu3.8) ...
8.491 No schema files found: doing nothing.
8.495 Setting up libglib2.0-data (2.80.0-6ubuntu3.8) ...
8.499 Setting up libatomic1:amd64 (14.2.0-4ubuntu2~24.04.1) ...
8.502 Setting up libssh-4:amd64 (0.10.6-2ubuntu0.3) ...
8.506 Setting up python3.12-minimal (3.12.3-1ubuntu0.11) ...
8.965 Setting up libpython3.12-stdlib:amd64 (3.12.3-1ubuntu0.11) ...
8.968 Setting up python3.12 (3.12.3-1ubuntu0.11) ...
9.483 Setting up libcurl3t64-gnutls:amd64 (8.5.0-2ubuntu10.7) ...
9.489 Setting up libpython3.12t64:amd64 (3.12.3-1ubuntu0.11) ...
9.494 Processing triggers for libc-bin (2.39-0ubuntu8.7) ...
9.543 Errors were encountered while processing:
9.543  packages-microsoft-prod
9.558 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
[+] build 0/1
 ⠙ Image docker.b3p.nl/tailormap/tailormap-data_sqlserver:snapshot Building                                                                                                                                                              9.9s
Dockerfile:17

--------------------

  16 |     

  17 | >>> RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \

  18 | >>>     && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \

  19 | >>>     && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen "en_US.UTF-8" \

  20 | >>>     && apt update -y && apt upgrade -y && apt autoremove -y && apt autoclean && apt clean \

  21 | >>>     && rm -rf /tmp/* && rm -rf /var/tmp/* && rm -rf /var/lib/apt/lists/* \

  22 | >>>     && chmod +r /docker-entrypoint-initdb.d/geodata.backup.dump

  23 |     

--------------------

failed to solve: process "/bin/sh -c ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone     && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8     && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen \"en_US.UTF-8\"     && apt update -y && apt upgrade -y && apt autoremove -y && apt autoclean && apt clean     && rm -rf /tmp/* && rm -rf /var/tmp/* && rm -rf /var/lib/apt/lists/*     && chmod +r /docker-entrypoint-initdb.d/geodata.backup.dump" did not complete successfully: exit code: 100

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions