An important way to ensure you’re not bringing in unintended files is to define a .dockerignore file.
.dockerignore sample:
# Ignore git and caches
.git
.cache
# Ignore logs
logs
# Ignore secrets
.env
# Ignore installed dependencies
node_modules
...


