W: https://mirrors.aliyun.com/docker-ce/linux/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. ChatGPT
It looks like you're encountering a warning related to the deprecation of the apt-key tool in Ubuntu. The message is indicating that the key for the Docker repository is stored in the legacy trusted GPG keyring, and this method is now considered deprecated.
To address this, you should consider using the new key management system provided by APT. Here are the steps you can follow:
Import the Docker GPG key:
bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add the Docker repository with the new keyring:
bash
echo "deb [signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Update the package list:
bash
sudo apt-get update
By following these steps, you'll be using the new key management system without relying on the deprecated apt-key tool. This should resolve the warning you're seeing.
Keep in mind that the URLs and keyring filenames might change, so it's a good idea to check the official Docker documentation for the latest instructions: Docker Installation Guide.