
Write a Dockerfile that builds a Python application on a pinned base image - working directory, vendored dependency install, source copy and default command - then build it under a given tag and run it.
Configure ENTRYPOINT and CMD in exec form so an image runs as an executable with overridable default arguments, and compare it with a shell form variant that leaves a shell at process 1.
Define the build context deliberately with a .dockerignore, separate build-time arguments from run-time environment, and prove that ignored files never reach any layer of the image.
Package an inherited service into an image anyone can rebuild identically: a pinned base, a trimmed context that leaks no secret into a layer, build-time and run-time configuration kept apart, and an exec-form entrypoint with defaults that stops cleanly.