Given I have dockerized application that connects to docker image of elasticsearch via docker-compose

e.g.:

--- version: '3' services: elasticsearch: image: elasticsearch:6.6.1 environment: myapp: image: myapp:latest build: context: . dockerfile: Dockerfile links: - elasticsearch:elasticsearch

When I do docker-compose up

I get error: