A Docker with Ubuntu and a Docker with Java

Hey, i’m a new user.

I wuould like to have 2 different Dockers.

The first Docker is a linux one and in the second i would install java jdk.

At all i would that the two Docker can cooperante, so if i have a .jar on the first i can use the jdk on the second one.

Thanks a lot.