# Using custom terraform provider in docker

**URL:** <https://discuss.hashicorp.com/t/using-custom-terraform-provider-in-docker/57802>\
**Category:** Plugin Development\
**Created:** [August 30, 2023, 5:54pm UTC](https://discuss.hashicorp.com/t/using-custom-terraform-provider-in-docker/57802 "2023-08-30T17:54:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtrvno](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/dtrvno/32/23824_2.png) [@dtrvno](https://discuss.hashicorp.com/u/dtrvno)\
**Post date:** [August 30, 2023, 5:54pm UTC](https://discuss.hashicorp.com/t/using-custom-terraform-provider-in-docker/57802/1 "2023-08-30T17:54:07Z")

</div>

Hi, I created custom terraform provider.

I want to use that provider insider docker.  
I build docker file by using hashicorp/terraform  
Here is start of Dockerfile FROM hashicorp/terraform:1.4.2

Docker has been build on linux ubuntu,  
Custom terraform provider also has been build and copied inside the docker into proper place.

Then I map corresponding directories containing tf files and started docker with entry point “sh”

Then run command “terraform apply” and got error:

terraform apply  
╷  
│ Error: Failed to load plugin schemas  
│  
│ Error while loading schemas for plugin components: Failed to obtain provider schema: Could not load the schema for provider localhost/supermicro/orch: failed to instantiate provider  
│ “\<…\>//orch” to obtain schema: fork/exec .terraform/providers/\<…\>//orch/1.0.1/linux\_amd64/terraform-provider-orch: no such file or directory…  
╵  
/app #

I tried to run executable by myself and got error like  
/app # ./ter  
sh: ./ter: not found

Looks like executable has wrong format. I can run that executable on ubuntu.

Your docker OS has version  
app # cat /etc/os-release  
NAME=“Alpine Linux”  
ID=alpine  
VERSION\_ID=3.17.2  
PRETTY\_NAME=“Alpine Linux v3.17”  
HOME\_URL=“[https://alpinelinux.org/](https://alpinelinux.org/)”  
BUG\_REPORT\_URL=“[Issues · alpine / aports · GitLab](https://gitlab.alpinelinux.org/alpine/aports/-/issues)”

Just for testing I copied unzip form ubuntu inside your docker and got the same message:  
/app # ./unzip  
sh: ./unzip: not found  
/app #

Do you have terraform docker based on ubuntu?

Any other options?

Thanks,  
Dmitriy
