Skip to content

Docker image fails apt-get update due to expired Yarn GPG key #982

@edgariscoding

Description

@edgariscoding

Issue Description

Describe the bug

The swacli/static-web-apps-cli:latest Docker image fails when attempting to run apt-get update due to an expired GPG signing key for the Yarn repository that's configured in the image.

Error Message:

Err:4 https://dl.yarnpkg.com/debian stable InRelease
  The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
W: GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: EXPKEYSIG 23E7166788B63E1E Yarn Packaging <yarn@dan.cx>
E: The repository 'https://dl.yarnpkg.com/debian stable InRelease' is not signed.

Impact

This issue breaks CI/CD pipelines that use the Docker image and need to install additional packages (e.g., Azure CLI). The failure started occurring approximately 2 days ago (around 2026-01-24) without any pipeline configuration changes, indicating the Yarn GPG key expired recently.

To Reproduce

  1. Use the Docker image: docker pull swacli/static-web-apps-cli:latest
  2. Run any command that triggers apt-get update:
    docker run swacli/static-web-apps-cli:latest bash -c "apt-get update"
  3. Observe the GPG signature error for the Yarn repository

Expected behavior

The Docker image should either:

  • Have an updated/valid Yarn GPG key, OR
  • Not include the Yarn repository if it's not required by the CLI

Environment

  • Docker Image: swacli/static-web-apps-cli:latest
  • Image Digest: sha256:9c87921bcacfd1951407987e3a7da2d8fc8be103a373c9a595cfa5f0333f3510
  • Base OS: Debian Bookworm
  • Affected Context: GitLab CI/CD with shared runners

Suggested Fix

Update the Dockerfile to either:

  1. Remove the Yarn repository if it's not needed:

    RUN rm -f /etc/apt/sources.list.d/yarn.list
  2. Or update the Yarn GPG key:

    RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -

Workaround

For users affected by this issue, add this to your pipeline before any apt-get update commands:

sudo rm -f /etc/apt/sources.list.d/yarn.list

Additional context

This is blocking multiple development teams using GitLab CI/CD pipelines with this Docker image. Since Yarn is managed via npm/corepack in modern Node.js environments, the apt repository may no longer be necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions