How does ENTRYPOINT Docker directive react when extending images

I want to know does react the ENTRYPOINT instruction from Dockerfiles when heritage happens :

Let’s say for example I have an image called : jenkins

  • How to RUN docker commands inside a folder
  • How to upload next version of code on amazon AWS which has docker instance?
  • Best practice using Dockerfile with docker-compose and vcs
  • How to make redis BROKER_URL dynamic on deployment to AWS instance
  • How to start a docker container with docker-java library?
  • Docker overrides the IP address of my own manually created bridge
  • FROM java:8-jdk
    RUN ...
    ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/"]

    By running this image, the ENTRYPOINT directive will start and install the application as expected

    Let’s say now that I want to extend this image with a new Dockerfile, I call it : jenkins-custom

    FROM jenkins
    # enable start tls
    RUN echo "JENKINS_JAVA_OPTIONS=\"-Dmail.smtp.starttls.enable=true\"" >> /etc/default/jenkins
    RUN chown jenkins:docker /etc/default/jenkins

    Should I consider that :

    1. the jenkins entrypoint is triggered after my new lines.
    2. entrypoint will be trigered before my new lines.
    3. entrypoint will not be triggered.

    In my example, I am trying to activate STARTTLS in default Jenkins docker image, should I just restart the process in the second image ?

    Thanks to all 😉

  • How to bring a running docker container again foreground
  • docker-machine env default | eval “$(docker-machine env default)” | unable to run command docker
  • How to find docker rest api url?
  • How to make Hazelcast nodes installed in docker on different aws instances interact with each other?
  • 'docker push …' from Bitbucket Pipelines is very slow to my self-hosted docker registry
  • Is it possible to start multiple docker daemons on the same machine
  • One Solution collect form web for “How does ENTRYPOINT Docker directive react when extending images”

    The commands in ENTRYPOINT run when you execute docker run. However, commands in RUN are executed when you run docker build.

    In your case, what’s going to happen is that when you docker build the image, a new Jenkins configuration file is generated, and then when you docker run it, tini is launched, and in turns execute the

    If what you’re trying to do is change the Jenkins configuration and nothing else, what you have here is good.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.