lib/kitchen/driver/docker.rb in kitchen-docker-0.6.0 vs lib/kitchen/driver/docker.rb in kitchen-docker-0.7.0
- old
+ new
@@ -48,11 +48,10 @@
def create(state)
state[:image_id] = build_image(state) unless state[:image_id]
state[:container_id] = run_container(state) unless state[:container_id]
state[:hostname] = container_address(state) unless state[:hostname]
wait_for_sshd(state[:hostname])
- ensure_fqdn(state)
end
def destroy(state)
rm_container(state) if state[:container_id]
if config[:remove_images] && state[:image_id]
@@ -153,14 +152,9 @@
def container_address(state)
container_id = state[:container_id]
output = run_command("docker inspect #{container_id}")
parse_container_ip(output)
- end
-
- def ensure_fqdn(state)
- ssh_args = build_ssh_args(state)
- ssh(ssh_args, 'echo "127.0.0.1 `hostname`" | sudo tee -a /etc/hosts')
end
def rm_container(state)
container_id = state[:container_id]
run_command("docker stop #{container_id}")