Apt-add-repository not updating sources list on build

You probably ran the command twice because whenever I ran it in a test container it fails first even interactively. The repo list file remains empty until running add-apt-repository the second time. It must be something APT or Debian-related. I’m not exactly sure, but I would not use add-apt-repository in a script. You probably had to install dependencies just for this when you can simply create your repository list file and copy it to /etc/apt/sources.list.d/

If you use code blocks, it shouldn’t happen. Formatting guide: How to format your forum posts

I added codeblocks to your post to make it more readable, but I didn’t fix the URLs