You'll need to link your containers together directly to get this working. For example, adjust your elasticsearch startup to include a name
:
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.1
and then direct kibana to use that name to find the elasticsearch instance:
docker run -p 5601:5601 -e SERVER_NAME=test -e ELASTICSEARCH_URL=http://elasticsearch:9200 docker.elastic.co/kibana/kibana:6.3.1