Docker Community Forums

Share and learn in the Docker community.

ONBUILD not run

(Rafaelri) #1

Hi all,

I am not sure whether I misunderstood ONBUILD usage on a docker machine but I’ve forked a docker image for oracle-xe and I am trying to improve it. I thought I could use ONBUILD to trigger oracle configuration upon image usage but after succesfulling creating my image and trying to run it either from docker-compose or directly with docker run the entrypoint is called immediately without the ONBUILD instruction that is on the parent image being run. Am I missing something here?
Here is the link for my [docker-oracle-xe-11g fork] (
I tried running it directly with docker run rafaelri/docker-oracle-xe-11g:latest and with docker-compose and the following docker-compose.yml file but both resulted in the being called directly before my ONBUILD RUN instruction from the parent image was called.
oracle: image: rafaelri/docker-oracle-xe-11g
What am I missing here in order to have the ONBUILD RUN to get run before the entrypoint?

Best regards,

(Rafaelri) #2

Just figured out by myself. Running does not trigger a build, hence the reason my onbuild is not being fired.