Where is the source code for the offical terraform docker image?

New to Terraform,

I see Terraform has an official docker image. But can’t seem to be able to locate its source (Dockerfile). Github searching
Hashicorp for docker-terraform and terraform-docker yields nothing. Is there a link I can follow?

It turns out its closed source? The main Terraform repo contains a Dockefile and it states:

This produces a docker image that contains a working Terraform binary along
with all of its source code. This is not what produces the official releases
in the “terraform” namespace on Dockerhub; those images include only
the officially-released binary from releases.hashicorp.com and are
built by the (closed-source) official release process.

Hi @aronggile,

The Dockerfile which produces the official images is indeed not available in an open source repository. This is not because there’s anything secret in it but just because the overall release process (of which the Docker image build is just one small part) lives in a private repository so it can have access to secrets such as the release signing private key that our developers don’t have direct access to.

We are in the process of reworking this process so that the build steps will happen in the open source repository while the signing and publication steps will happen in a more controlled location. That work in progress means that there is an open source Dockerfile that is effectively the same as the one from the private repository; it started as an exact copy of it and has only been lightly modified to suit the new build process:

In the future we expect to begin making real releases from this Dockerfile instead (following the steps you can see in the build.yml GitHub Actions workflow); we’re making incremental progress towards that but are prioritizing real feature and bug fix work so can’t promise when we’ll be ready to switch over. But that doesn’t mean you can’t use this other Dockerfile as a reference for how to build similar images yourself in the meantime.

Thank you for the response and got it. I just wanted to see how to configure it
as the official doc does not say much. Not sure how I can mark this question as
answered so I will leave it a that for now. Thank you again.

Hi Everyone,

Docker is used to create, run and deploy applications in containers. A Docker image contains application code , libraries, tools, dependencies and other files needed to make an application run.

I have a little bit of question from you guys. Is docker still use source code for editing images? If yes then how it will proceed it?