Wednesday, 18 June 2025

Docker has evil

Here's something I chased around for an hour or so.

You get the minimal version: 

% cat Dockerfile
ARG THANG=zero
FROM alpine
ARG THING=one
RUN export THING=two && echo ${THING?} && echo ${THANG?}
% docker build --no-cache --progress=plain .

 

Account for the weirdnesses in the output. Here's a non-spoilery except:

------
 > [2/2] RUN export THING=two && echo one && echo ${THANG?}:
0.072 two
0.072 /bin/sh: THANG: parameter not set
------