I had to COPY
and untar java package in my docker image.
When I compared the docker image size created using ADD it was 180MB bigger than the one created using COPY, tar -xzf *.tar.gz and rm *.tar.gz
This means that although ADD removes the tar file, it is still kept somewhere. And its making the image bigger!!