Apt-get update falla dentro del contenedor yarn repo no firmado

Suena bien. Solo para confirmar, necesito crear un nuevo contenedor de importación de phpbb3 y no puedo. Aquí te explico cómo solucionarlo.

Aquí tienes esto:

Pero recomienda usar curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - pero apt-key está obsoleto.

Si hago esto en el contenedor:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg -o /usr/share/keyrings/yarn-keyring.asc \
    && sed -i '1s;^deb;deb [signed-by=/usr/share/keyrings/yarn-keyring.asc];' /etc/apt/sources.list.d/yarn.list

Entonces puedo hacer esto:

root@monstera-web-only:/# apt-get update
Hit:1 https://deb.nodesource.com/node_18.x bullseye InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Get:3 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
Get:4 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Hit:5 http://deb.debian.org/debian bullseye-updates InRelease
Hit:6 http://deb.debian.org/debian bullseye-backports InRelease
Get:7 https://dl.yarnpkg.com/debian stable/main all Packages [10.9 kB]
Get:8 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [216 kB]
Hit:9 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease
Get:10 https://dl.yarnpkg.com/debian stable/main amd64 Packages [10.9 kB]
Fetched 286 kB in 0s (849 kB/s)
Reading package lists... Done

De manera similar, si agrego

          - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg -o /usr/share/keyrings/yarn-keyring.asc && sed -i '1s;^deb;deb [signed-by=/usr/share/keyrings/yarn-keyring.asc];' /etc/apt/sources.list.d/yarn.list

antes de apt-get update en templates/import/phpbb3.template.yml, puedo construir un nuevo contenedor.

3 Me gusta