Перейти к содержимому

devenv: a container image from the lock (Dockerfile drift, image size, ECS)

blickflick

0:00 / 0:00

devenv: a container image from the lock (Dockerfile drift, image size, ECS)

9 просмотров · 3 дня назад
blickflick
7 подписчиков
9 просмотров · 3 дня назад
Hand the app over as a container image. The usual Dockerfile gets its Python from a base image tag, not your lock, so it drifts from the shell: this episode watches that drift stop a container at start, keeps the version in step with one file, then builds the image from the lock instead, 2.16 GB by default and 306 MB once it holds only the package. What you'll learn: What goes in the image: the package (the app, its database library, its Python), and what an ECS task definition supplies when the container starts Drift: Python 3.10's end of life (PEP 619), a move to 3.12 that passes every test, and an ImportError when the image starts One .python-version file read by both recipes, with uv refusing any other Python in the image build The package from uv's lock with devenv build, the image with devenv container copy, and why the default image holds your whole dev environment (its closure) Trimming it to 306 MB, running the shell's very same Python build, and what each route costs to keep up Pushing to a registry, the image digest, and the database address coming from the platform's secrets store Chapters: 00:00 Intro 01:11 The usual way 01:44 The drift 03:09 Keep in step 04:11 Build from the lock 05:39 Why the default image is 2.16 GB 05:56 Trim it 07:25 Hand it over 07:55 Recap Shown with devenv 2.4.0 and Docker 29, recorded on Linux. Previous: Several parts, one repo. Next: A real system, one command. Unofficial tutorial, not affiliated with Cachix or the devenv project. Docs: https://devenv.sh