How do you handle timezone and locale in minimal images?
BeginnerScenarioImage design and Dockerfile decisions
Answer
Situation read → Slim images ship without tzdata, so TZ=Asia/Kolkata is silently ignored.
What I'd do →
RUN apt-get update && apt-get install -y --no-install-recommends tzdata \
&& rm -rf /var/lib/apt/lists/*
ENV TZ=Asia/Kolkata
Better practice: keep containers on UTC and format time in the UI layer.
Why → Logs and cron across services stay comparable.
Interview tip → Mention Go's time/tzdata import to embed zone data in a static binary.
More on Image design and Dockerfile decisions
A teammate's Node.js image is 1.2 GB. How do you approach shrinking it?BeginnerYou need to run `apt-get install` in a Dockerfile. How do you write it so the layer stays small and cache-safe?BeginnerWhen would you pick `COPY` over `ADD`?BeginnerA service must run a startup script and then the app. Should you use `CMD`, `ENTRYPOINT`, or both?BeginnerYour Docker build re-installs all Python dependencies on every code change. Fix it.BeginnerProduct asks for a container that runs both nginx and a Python app. What do you say?Beginner