build time and run time
Build time is when software, such as a container image, is built and run time is when it is actually running, and every setting belongs to one or the other.
In more detail
For a container, files, installed packages and the default command are fixed at build time and go into the image. Published ports, memory limits, secrets and most environment values are chosen at run time, so one image can run differently in development and production without a rebuild. Types and checks that exist at build time are not automatically available when the program runs, so data from users, networks and configuration has to be validated at run time.
Example
TypeScript types vanish at build time, so payloads and environment variables are validated with runtime schemas.Related terms
- image — A read-only package containing a program and everything it needs to run, used as the template for containers.
- container — A running program that has been fenced off from the rest of the computer so it only sees its own files, network and processes.
- port publishing — Forwarding a port on the host to a port inside a container so the service can be reached from outside.
- resource limit — A cap on how much memory, processor time or number of processes a container may use.
- restart policy — A setting that tells Docker or Kubernetes whether to start a container again automatically after it exits.
- compile time — The moment source code is checked and translated by a compiler, before the program runs, as opposed to run time.
- validation schema — A description of what valid data looks like, checked by code while the program runs so bad data is rejected at the door.
- environment variable — A named setting such as PORT=8000 that a program reads from its surroundings when it starts.
Taught in
- Choose The Right Workload Resource — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Requests, Limits And Quotas — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Why Containers: Bare Metal, Machines And Processes — Docker Architecture & Production Containers
- Docker, OCI, The Engine And The CLI — Docker Architecture & Production Containers
- Run, Stop, Restart And Remove A Container — Docker Architecture & Production Containers
- Commands, Logs, Exec And Exit Codes — Docker Architecture & Production Containers
- Run The Spine Service And Publish Its Port — Docker Architecture & Production Containers
- FROM, WORKDIR, COPY And ADD — Docker Architecture & Production Containers
- RUN, SHELL And Efficient Layer Caching — Docker Architecture & Production Containers
- ARG, ENV, LABEL, EXPOSE And VOLUME — Docker Architecture & Production Containers
- CMD, ENTRYPOINT, USER And Process Signals — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Environment, Secret Files And Runtime Restrictions — Docker Architecture & Production Containers
- Build, Test And Promote The Same Image In CI — Docker Architecture & Production Containers
- The C# Language: Types, Variables, and Flow Control — Modern .NET Core, C# & Enterprise Microservices
- Collections, Generics, and LINQ — Modern .NET Core, C# & Enterprise Microservices
- Source-Generated Mapping with Mapperly — Modern .NET Core, C# & Enterprise Microservices
- End-to-End Type Safety: Shared Schemas & DTOs — Production Full-Stack Engineering
- Environment Configuration: Secrets & Multi-Stage — Production Full-Stack Engineering
- API Contract Architecture: OpenAPI 3.1 & Schema Truth — Production Full-Stack Engineering
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering