Built codebase doesnt appear after deploying
Well after some research, it seems the initial issue was caused by the volume mount configuration in the host's docker-compose.yml

Even I put below line on build Dockerfile which copies the files to the given path

ADD . /var/www/html


Since the host's docker-compose.yml got line like below

volumes:
    - .:/var/www/html  


The container mounting this directory as a new directory to it's Unix like filesystem. So it masks the underlying files.
So on the file system its a new directory and doesn't represent the underlying files. Basically its empty.
This Github issue confirms this. 

Then it runs the wordpress:latest's docker-entrypoint.sh
Which set /var/www/html as the working directory and if it doesn't contain index.php and wp-includes/version.php (obviously it doesn't due to above matter, directory is new) inside, it downloads and extract WordPress source to this directory. That's why after the mount, my old bundled data wasn't there. 

So I was basically tried to do something which was not intended. 

As @Jeremy commented,  


  as /var/www/html? It sounds like your mount is failing - and that the
  ADD Is superfluous




Another try Was totally wrong. Because I was adding a custom ENTRYPOINT script to my build Dockerfile, so it keeps ignoring the base image wordpress's ENTRYPOINT and CMD that's why it wasn't copy new source to the directory.