Is it possible to use envsubst with build-arg during build time of the docker image ? I have a following scenario:
FROM alpine as substitutor
ARG ROOT_PWD
RUN apk add --no-cache envsubst
WORKDIR /app
COPY ./myfile.json .
RUN export ROOT_PASSWORD=${ROOT_PWD} && \
envsubst < myfile.json
But it doesn't seem to be working. any ideas ?
I suspect you are using
DOCKER_BUILDKIT, in which case by default the output is not shown.You can either disable
DOCKER_BUILDKITor you can change the progress output.So given:
and Dockerfile:
Disabling
DOCKER_BUILDKIT:Using
--progress=plain: