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

Support for using Data Sources without access to a Docker Daemon #634

Open
jbeemster opened this issue Jul 3, 2024 · 1 comment
Open

Comments

@jbeemster
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

I have a use-case where I want to leverage the docker_registry_image data sources in an environment where I don't have access to a Docker daemon but want to be able to validate that an image exists in a registry and fetch details of that image.

Currently this error comes back:

Error: Error pinging Docker server: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Would ideally like a way to disable needing access to the Docker daemon so I can still use resources that do not require it.

Potential Terraform Configuration

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

provider "docker" {
  disable_docker_daemon_check = true|false # default: false

  registry_auth {
    address  = "registry-1.docker.io"
  }
}
@ankon
Copy link

ankon commented Aug 8, 2024

I have a use-case where I want to leverage the docker_registry_image data sources in an environment where I don't have access to a Docker daemon but want to be able to validate that an image exists in a registry and fetch details of that image.

We have exactly the same situation: We're depending on some third-party images that change rarely, and when they do we might miss the changes for quite some time. Ideally we would have the ability to query the registry data for the latest image details (not :latest, but "latest with a tag"), and then flag that an update is needed simply in the terraform plan step (which I could run on a schedule, for instance).

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