Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Docker pull command pulls from cache - not getting latest image #267

Open
wereinse opened this issue May 12, 2020 · 0 comments
Open

Docker pull command pulls from cache - not getting latest image #267

wereinse opened this issue May 12, 2020 · 0 comments

Comments

@wereinse
Copy link

wereinse commented May 12, 2020

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v0.12.21

Affected Resource(s)

Please list the resources as a list, for example:
Docker image version

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

# 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.

See changes below:

image

Changes made are below:
This is from : https://github.com/retaildevcrews/helium-iac/blob/master/src/modules/db/main.tf

resource "azurerm_cosmosdb_sql_container" "cosmosdb-movies" {
  for_each            = var.INSTANCES
  name                = "movies"
  resource_group_name = var.COSMOS_RG_NAME
  account_name        = azurerm_cosmosdb_account.cosmosdb.name
  database_name       = azurerm_cosmosdb_sql_database.cosmosdb-imdb[each.key].name
  partition_key_path  = "/partitionKey"
}

data "docker_registry_image" "imdb-import" {
  name = "retaildevcrew/imdb-import"
}

resource "docker_image" "imdb-import" {
  name          = data.docker_registry_image.imdb-import.name
  pull_triggers = ["${data.docker_registry_image.imdb-import.sha256_digest}"]

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

What should have happened?
resource "docker_image" "imdb-import" should have pulled the latest image

Actual Behavior

What actually happened?
The above command pulled a cached image instead of going back for the original.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply with the resource "docker_image" "imdb-import" command in place .
  2. Run once
  3. Change the image
  4. Run again and you should get the older image

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

  • GH-1234
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant