Thank you for considering contributing to the Docker Terraform Provider! We welcome contributions from everyone. To ensure a smooth process, please follow the guidelines below.
- Before creating a new issue, please check if the issue has already been reported in the list of existing issues
- If you don't find an existing issue, open a new one and fill out the template based on the issue type - it's important to provide as much detail as possible
- Fork the repository
- Check with the authors in an issue ticket before doing anything big
- Contribute improvements or fixes using a Pull Request
- Provide a clear description of what your PR does, why is it important, and list the related issues
- Make small commits that are easy to merge
- Make sure to test your changes
- When updating documentation, please see our guidance for documentation contributions (TODO)
make
,git
,bash
- Terraform >= 1.1
- Go >= 1.21
- Ensure your GOPATH is correctly setup, as well as adding
$GOPATH/bin
to your$PATH
- Ensure your GOPATH is correctly setup, as well as adding
- Clone
terraform-provider-docker
git clone https://github.com/docker/terraform-provider-docker
- Install provider & setup
~/.terrraformrc
makingregistry.terraform.io/docker/docker
reference your local installation
make local-build
- Setup your Docker Hub username & password
export DOCKER_USERNAME=$(yourusername)
export DOCKER_PASSWORD=$(yourpassword)
- Run an example build!
cd examples && terraform plan
Note, when you run the terraform plan
you should see a warning, this ensures that you using the locally installed provider and not the publically available provider.
│ Warning: Provider development overrides are in effect
Happy developing!
Run full test suite:
make testacc
Run an specific test(s):
make testacc TESTS=TestAccXXX
which is equivalent to:
TF_ACC=1 go test ./... -v -count 1 -parallel 20 -timeout 120m -run TestAccXXX
where TestFuncName
is the testing function within the _test.go
file.
# enable debug logging
export TF_LOG=DEBUG
export TF_LOG_PATH="/PATH/TO/YOUR/LOG_FILE.log"
# acceptance testing overrides
export ACCTEST_DOCKER_ORG=myorgname
...
If you have any questions or need assistance, please reach out to us through in the DTP Slack Channel (TODO)
Your contributions help make the Docker Terraform Provider better for everyone. We appreciate your support and effort!