Comments (14)
- done @suzuki-shunsuke -> https://github.com/kreuzwerker/terraform-provider-docker/releases/tag/v2.9.0
- @dubo-dubon-duponey regarding #14 (comment): I added a simpler way: https://github.com/kreuzwerker/terraform-provider-docker/blob/master/CONTRIBUTING.md#test-against-current-terraform-iac-descriptions
- @quentinadam can you re-test :)
from terraform-provider-docker.
Oh, sorry. I confirmed that this is fixed at the master.
I'll close #15 .
from terraform-provider-docker.
Hmm..
I fixed the bug by hashicorp/terraform-provider-docker#272 ...
from terraform-provider-docker.
Oh, Computed: true
was removed??
terraform-provider-docker/docker/resource_docker_container.go
Lines 197 to 208 in 8476f9b
from terraform-provider-docker.
Computed: true
was removed by this commit.
hashicorp/terraform-provider-docker@cdc0d91
from terraform-provider-docker.
Will be fixed by #15
from terraform-provider-docker.
@suzuki-shunsuke that might be fixed already:
hashicorp/terraform-provider-docker#319
hashicorp/terraform-provider-docker#320
@quentinadam do you mind trying with master?
from terraform-provider-docker.
Happy to try that of course. I guess I should change something in the "versions.tf" file to use the latest master version instead of version 2.8.0 ? Would you mind pointing out what I should change in that file ? Here is the current version of the versions.tf file :
terraform {
required_providers {
digitalocean = {
source = "digitalocean/digitalocean"
}
docker = {
source = "kreuzwerker/docker"
}
}
required_version = ">= 0.13"
}
from terraform-provider-docker.
https://github.com/kreuzwerker/terraform-provider-docker/#developing-the-provider
These instructions suggest that you can just build it and use it by removing the version.
I don't remember if this ^ works or not though.
Here is what I've been doing (possibly because the above ^ is outdated?)
- clone and build (
make build
) - you should now have a built plugin in your GOPATH/bin folder.
In my case:
dmp@macArena:~/Projects/Deploy/home$ which terraform-provider-docker
/Users/dmp/Applications/bin/gvm/pkgsets/go1.15/global/bin/terraform-provider-docker
- Create
~/.terraformrc
with the following:
provider_installation {
filesystem_mirror {
path = "/Users/dmp/Projects/Deploy/home/built-plugins/"
include = ["terraform-providers/docker"]
}
}
^ adapt this path to whatever suits you.
- Copy the plugin
dest=/Users/dmp/Projects/Deploy/home/built-plugins/registry.terraform.io/terraform-providers/docker/2.7.2/darwin_amd64
mkdir -p "$dest"
cp $(which terraform-provider-docker) "$dest"
Be sure to adapt the version and platform in the path to match your mileage.
Curious if there is a simpler / more straightforward way to achieve that.
from terraform-provider-docker.
Then we'd trigger a release as soon as #12 is fixed
from terraform-provider-docker.
@mavogel @suzuki-shunsuke I've been thinking more about this patch.
It makes the situation better, for sure, but I now think it's wrong / incomplete.
Here is what should happen:
- if working_dir is explicitly set to value A:
- if the existing container has value B (!= A) for working_dir, rebuild
- if the existing container has value A, do not rebuild
- if working_dir is not set, or set to "":
- if working_dir was previously NOT set (or set to to ""), do NOT rebuild (regardless of the value of working_dir in the running container)
- if working_dir was previously set to value B (!= ""), and if the container "in dockerfile" working_dir was C (!= B), then rebuild
I have no idea how to do that... since this involve looking up both the past value of working_dir, and the value of working_dir if the container was started without explicitly overriding working_dir...
With what we have right now, this will be wrong in the following scenario:
- container was previously started with working_dir = A (where A is different from whatever the container had internally)
- we now ask for a reapply with working_dir = ""
- -> the container will not be rebuilt (while it should)
Again, I think what we have now is much better than before, but it will still be wrong in corner cases like that...
from terraform-provider-docker.
#14 (comment)
@mavogel How about releasing the new version? #26 was merged.
from terraform-provider-docker.
Great ! I am confirming that it now works as expected (not defining "working_dir" does not trigger a container replacement on every run).
from terraform-provider-docker.
Happy to hear that! Will close it.
from terraform-provider-docker.
Related Issues (20)
- Support for automatic spell-checking
- Docker Containers Destroyed if Stopped When Refreshing State HOT 2
- Authentication fails on docker hub
- provider ignoring context if a dockerfile exists in the current directory
- `docker_regsitry_iamge` is not able to pull image metadata from a private registry
- Creation of docker container failed (python image) HOT 1
- `docker_image` doesn't build specified platform
- Lambda consistently fails the FIRST pull from ECR after `docker_image_registry` completed uploading `docker_image` HOT 1
- Support for `docker image import`
- Feat: Support buildtime Secrets
- docker_container devices forces resource replacement at all times HOT 11
- Support for detachable containers
- Conditionally rebuild image
- feat: Add support for additional docker_image build contexts
- Flaky `Error response from daemon: Conflict, cannot remove the default link name of the container` on `terraform destroy`
- Support for VolumeOptions.Subpath in docker_container.mounts.volume_options HOT 1
- Support for Docker Cluster Volumes HOT 1
- Error during pushing image to GCP Artifact Registry, Unable to create image, image not found: unable to get digest: Got bad response from registry: 405 Method Not Allowed HOT 1
- Error when pushing ECR public registry: `unable to get digest: Got bad response from registry: 400 Bad Request`
- Support for error message when service didn't converge
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-docker.