I'll cover the basics of how you can write a good Dockerfile to use with your javascript/typescript project.
Writing Dockerfiles itself is not hard, but there are some things to consider, so the resulting images are efficient, and the build process is as fast as possible.