Everything in DevOps & Cloud, page 11
What is a dangling image and how to prune it
A dangling image is an untagged layer (<none>:<none>) orphaned when a tag moves to a rebuilt image; list with docker images -f dangling=true, remove with docker image prune.
Debug a running container with the Docker CLI
Docker inspect for full state and config, docker logs -f to follow output live, docker exec -it <id> sh or bash for an interactive shell.
Multi-stage builds for compiled languages
Build in a stage with the full toolchain, then COPY --from only the artifact into a tiny final base, shrinking image size and attack surface.
Optimize Dockerfile layer caching for npm install
Copying all source first invalidates the npm install layer on any code change; instead copy package.json and lockfile, run npm install, then copy the rest.
Dockerfile CMD versus ENTRYPOINT
ENTRYPOINT sets the fixed executable; CMD sets default args or the default command; run-time args override CMD but append to ENTRYPOINT. Use together to make a fixed binary with overridable defaults.
Dockerfile COPY versus ADD
COPY just copies local files; ADD also auto-extracts local tarballs and can fetch remote URLs; prefer COPY for predictability, use ADD for local archive extraction.
Build, tag, and run a container with port mapping
Docker build -t my-app:1.0 . to build and tag; docker run -d -p 8080:80 my-app:1.0 to run detached with host:container port mapping.
Trace a container process's syscalls from the host
Find the host PID via docker inspect or ps, then strace -p that PID from the host, since the container shares the host kernel.
What is the OCI and why do its specs matter?
OCI defines vendor-neutral specs for image format and runtime so any compliant tool interoperates; runc implements the runtime spec; this prevents lock-in.
What is a container vs a VM?
Containers share the host kernel and isolate via namespaces and cgroups; VMs run a full guest OS on a hypervisor; containers are lighter and faster.
Migrating a stateful monolith to the cloud
Assess and inventory, pick a migration pattern like rehost or replatform, handle data migration and cutover, mitigate downtime and data-loss risk.
Diagnosing slow auto-scaled PaaS workloads
Application metrics like request latency, throughput, and DB query time; infrastructure metrics like CPU, memory, and scaling lag.
Blue/green versus canary deployments
Blue/green flips all traffic between two full environments; canary shifts a small slice gradually while watching metrics.
High availability versus fault tolerance
HA minimizes downtime via redundancy and failover; fault tolerance survives failure with zero interruption.
Difference between metrics and logs
Metrics are aggregated numeric time series good for trends and alerting; logs are discrete timestamped event records good for detailed root-cause analysis.
Design a multi-tenant model serving platform
Share infrastructure to cut cost while enforcing tenant data isolation, fair resource allocation against noisy neighbors, and per-tenant performance via quotas and autoscaling.
Event bus versus message queue for triggers
A queue is point-to-point buffered work for one consumer group; an event bus routes and filters one event to many decoupled subscribers. Event bus wins when many independent services must react.
Optimize cost of a big-data analytics platform
Storage tiering and lifecycle plus compression and partitioning; compute via spot instances, right-sizing, and efficient file formats; query and pipeline optimization to scan less data.
Strangler Fig with serverless and an event bus
API Gateway acts as the routing facade, new features run as Lambda functions, an event bus decouples and fans out to new services, and traffic shifts feature by feature until the monolith…
Configure a Kubernetes Horizontal Pod Autoscaler
HPA adjusts replica count toward a target CPU metric, needs the metrics server and pod resource requests, and scales a deployment between min and max.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles