version: '3.3' services: client: image: docker.elastic.co/clients/elasticsearch-py:${PYTHON_VERSION:-3} build: context: . dockerfile: Dockerfile args: PYTHON_VERSION: ${PYTHON_VERSION:-3} environment: - "TEST_ES_SERVER=http://elasticsearch:9200" volumes: - .:/code/elasticsearch-py - esvol:/tmp networks: - esnet depends_on: - elasticsearch command: ["true"] # dummy command to override the command in the Dockerfile and do nothing. elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch-oss:${ELASTIC_VERSION:-6.2.4} volumes: - esvol:/tmp networks: - esnet environment: - path.repo=/tmp - "repositories.url.allowed_urls=http://*" - node.attr.testattr=test - bootstrap.memory_lock=false - "discovery.zen.ping.unicast.hosts=elasticsearch" - "http.max_content_length=5mb" networks: esnet: volumes: esvol: