Putting Application Files in the Image
WORKDIR sets the current directory for subsequent instructions. COPY transfers files from the build context into the image and is preferred for ordinary application files. ADD has additional behavior and is usually unnecessary for simple copies.
Only send the files needed for the build. A good .dockerignore prevents local dependencies, Git metadata, secrets, logs, and generated files from entering the build context.