terraform-provider-docker/examples/ssh-protocol/README.md
Manuel Vogel 8ad1a13c08
Add ssh protocol (copy) (#153). Closes #112
* adds support for ssh protocol
* updates docker cli dependency to f337f1
* adds example for using the ssh protocol
2019-05-26 21:06:10 +02:00

546 B

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