Skip to content

An error occurred listing credentials with docker-credential-gcrΒ #739

@glebbash

Description

@glebbash

Expected Behaviour
Should work fine :)

Actual Behaviour
Having docker-credential-gcr installed makes it not possible to start testcontainers.

Problem is that running docker-credential-gcr list command returns exit code 1, which triggers an error here:

return reject(new Error("An error occurred listing credentials"));

This is caused by list command being not implemented:

Usage: docker-credential-gcr <flags> <subcommand> <subcommand args>
...
Subcommands for Docker credential store API:
        erase            (UNIMPLEMENTED) erase any stored credentials for the server specified via stdin
        get              for the server specified via stdin, return the stored credentials via stdout
        list             (UNIMPLEMENTED) list all stored credentials
...

P.S: not really sure what commands are required to be implemented by docker credential helpers spec (if there is one) so it might be an issue for docker-credential-gcr repo.

Testcontainer Logs

Error: An error occurred listing credentials
    at /workspace/***/node_modules/testcontainers/build/container-runtime/auth/credential-provider.js:32:35
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:518:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

Steps to Reproduce

  1. Install docker-credential-gcr
  2. Run the following (or any other container):
import { GenericContainer, Wait } from "testcontainers";

const spannerEmulator = await new GenericContainer(
  "gcr.io/cloud-spanner-emulator/emulator"
)
  .withExposedPorts(9010)
  .withWaitStrategy(Wait.forLogMessage("gRPC server listening at"))
  .start();

Environment Information

  • Operating System: Ubuntu 22.04
  • Docker Version: 25.0.3
  • Node version: v20.11.1
  • Testcontainers version: 10.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageInvestigation required

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions