Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to target optional docker repo #323

Open
Techtesh opened this issue Nov 24, 2022 · 1 comment
Open

Add flag to target optional docker repo #323

Techtesh opened this issue Nov 24, 2022 · 1 comment

Comments

@Techtesh
Copy link

Techtesh commented Nov 24, 2022

Can we add a feature/flag to target another (on prem/ personal mirror) docker hub
My very basic test.yaml:

`schemaVersion: 2.0.0
commandTests:

  • name: "cacheTest"
    command: "ls"
    args: ["/home/developer/.cache"]
    expectedOutput: ["2.2...txt"]`

Command run :
'docker run gcr.io/gcp-runtimes/container-structure-test:latest test --driver tar --image localhost/test-local:test --config /test.yaml'

is giving me the following error
Error: error creating driver: retrieving image: retrieving remote image: Get "https://index.docker.io/v2/": dial tcp: lookup index.docker.io on 10.0.2.3:53: no such host

@coopernetes
Copy link
Contributor

Have you taken a look at registry-mirrors configuration on the Docker side? That should allow you to point to any arbitrary registry server (localhost or otherwise) to mirror Docker Hub image pulls.

I don't think cst is doing anything special in this regard for the image so I don't see how another flag would help. Whatever image gets resolved by the Docker driver/engine gets pass to cst to run your tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants