Docker creating multiple images

Images are immutable, so any change you make results in a new image being created. Since your compose file specifies the build command, it will rerun the build command when you start the containers. If any files you are including with a COPY or ADD change, then the existing image cache is no longer used and it will build a new image without deleting the old image.

Note, I'd recommend naming your image in the compose file so it's clear which image is being rebuilt. And you can watch the compose build output to the the first step that doesn't report using the cache to see what is changing. If I was to guess, the line that breaks your cache and causes a new image is this one in nodejs:

COPY . /usr/src/app

If the files being changed and causing the rebuild are not needed in your container, then use a .dockerignore file to exclude the unnecessary files.