fix: workdir null behavior (#320)

Closes #319 
Signed-off-by: dubo-dubon-duponey <dubodubonduponey+github@pm.me>
This commit is contained in:
dubo-dubon-duponey 2020-11-29 05:38:33 -08:00 committed by GitHub
parent de7c6be58a
commit c904efdddc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,6 +191,13 @@ func resourceDockerContainer() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
DiffSuppressFunc: func(k, oldV, newV string, d *schema.ResourceData) bool {
// treat "" as a no-op, which is Docker's default behavior
if newV == "" {
newV = oldV
}
return oldV == newV
},
},
"remove_volumes": {
Type: schema.TypeBool,