Skip to content

Docker image build fails: apt-key not available in upstream base image #12959

Description

@offtherailz

Description

The Docker image build fails because the upstream base images (tomcat:9-jdk17, tomcat:10.1-jdk17) are now based on Ubuntu 26.04 (apt 3.x), where apt-key has been removed.

The step installing postgresql-client-17 exits with code 127 (apt-key: command not found):

RUN apt-get update && apt-get install --yes wget gnupg2 lsb-release \
    && echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
    && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
...
ERROR: failed to build: failed to solve: process "/bin/sh -c apt-get update && ..." did not complete successfully: exit code: 127

How to reproduce

  • Pull the latest base image and build the Docker image (docker build --pull .)

Expected Result
The image builds successfully.

Current Result
The build fails at the PostgreSQL client installation step.

  • Not browser related

Other useful information

Detected while building the Docker image for release 2026.02.02. The fix needs to be backported to 2026.02.xx.

Activity

  1. added this to the 2026.02.02 milestone on Oct 7, 2026
  2. added
    BackportNeeded
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BackportNeededbug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions