craigmonson / terraform-provider-validate

Terraform provider that allows variable validation.
MIT License
6 stars 3 forks source link

Running inside official docker container #1

Open abelal83 opened 4 years ago

abelal83 commented 4 years ago

first off thank you very much for this provider :)

Ran into a small issue running this in docker...

Repro..

docker run --name abx-terraform -v C:\Users\abx\src:/home --entrypoint "/bin/ash" -it hashicorp/terraform

terraform apply...

.../terraform.d/plugins/linux_amd64/terraform-provider-validate_v0.3.1: not found

the file is 100% there, I then ran the same in Windows WSL and it ran fine. Any idea why it running in docker it fails?

All other providers work fine in both Docker and WSL.

Many thanks!

npc-adrian commented 4 years ago

@abelal83

Not sure if this will help but the root user's homedir is /root not /home so maybe you should try mounting your code there.

xanderflood commented 4 years ago

I believe this is caused by compiling with some CGO libraries that aren't present on the docker image (specifically in the net package). If the binaries were compiled with CGO_ENABLED=0 it should work