Reputation: 921
Supposing I have a base image that does some execution of it's own: does including this using the
FROM: image:version
run all the commands in the original Dockerfile? I.e. even things like RUN, ADD, etc .
Upvotes: 2
Views: 269
Reputation: 38287
No. The FROM
command uses that image:version
as the parent image (the pre-built snapshot of the file system). Your commands are then run on top of that.
However if the parent Dockerfile has ONBUILD RUN
statements, those will be RUN as if they were present at the very top of your Dockerfile.
Please see the Dockerfile docs
Upvotes: 4