How to use other images in my docker image

I want to create a Elastic search docker image. For this we need to install java. Instead of installing java I want to use java docker image which is available here How to use this in my ES docker image???

Start your Dockerfile with the line

FROM java

to use that base image.

There’s also a standard Elasticsearch image, which maybe you can just use directly, or if you need to customize it further you can use that as the FROM image. There’s no rule that you have to start from one of the standard distribution images.

Thanks for the reply. Its working as I expected. Now I have two images.

  1. telednacomm/nodepm2
  2. telednacomm/elastic

As per my understanding to bring up two images we can use docker compose. How to bring up these two at a time using docker compose ???