Is it possible to create Dockerfile
that executes a command on host when image is being build?
Now I'm doing:
./script_that_creates_magic_file.sh
docker build .
with Dockerfile:
FROM alpine
COPY magic_file
I want to be able to do:
docker build .
with Dockerfile:
FROM alpine
# invoke script_that_creates_magic_file.sh on the host
COPY magic_file
Of course, this script is in the same directory as Dockerfile.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…