The apt-key command was deprecated in Debian 12 and has been removed from Debian 13, which was released on August 9th. You'll need to alter your Dockerfile to no longer use it.
The apt-key manpage gives this guidance:
Except for using
apt-key delin maintainer scripts, the use ofapt-keyis deprecated. This section shows how to replace existing use ofapt-key.If your existing use of
apt-keyadd looks like this:wget -qO- https://myrepo.example/myrepo.asc | sudo apt-key add -Then you can directly replace this with (though note the recommendation below):
wget -qO- https://myrepo.example/myrepo.asc | sudo tee /etc/apt/trusted.gpg.d/myrepo.ascMake sure to use the "asc" extension for ASCII armored keys and the "gpg" extension for the binary OpenPGP format (also known as "GPG key public ring"). The binary OpenPGP format works for all apt versions, while the ASCII armored format works for apt version >= 1.4.
Recommended: Instead of placing keys into the
/etc/apt/trusted.gpg.ddirectory, you can place them anywhere on your filesystem by using the Signed-By option in your sources.list and pointing to the filename of the key. See sources.list(5) for details. Since APT 2.4,/etc/apt/keyringsis provided as the recommended location for keys not managed by packages. When using a deb822-style sources.list, and with apt version >= 2.4, theSigned-Byoption can also be used to include the full ASCII armored keyring directly in thesources.listwithout an additional file.
See also: What commands (exactly) should replace the deprecated apt-key?