mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-20 22:59:42 -05:00
* adds support for ssh protocol * updates docker cli dependency to f337f1 * adds example for using the ssh protocol |
||
|---|---|---|
| .. | ||
| main.tf | ||
| README.md | ||
Using and testing the ssh-protocol
The ssh:// which was introduced in docker can be tested/used as shown in this example.
# export your pub key(s) in terraform pub_key variable
export TF_VAR_pub_key="$(cat ~/.ssh/*.pub)"
# launch dind container with ssh and docker accepting your PK for root user
terraform apply -target docker_container.dind
# wait for few seconds/minutes
# ssh to container to remember server keys
ssh root@localhost -p 32822 uptime
# test docker host ssh protocol
terraform apply -target docker_image.test