What happens to entrypoint of Docker parent image when child defines another one?

Let’s say I’ve got the Docker image parent built by this Dockerfile:

FROM ubuntu
ENTRYPOINT ["parent-entry"]

Now I inherit from this parent image in my child image built with this code:

  • How do you list containers in Docker.io?
  • How to atomically update a counter shared between Docker instances
  • Docker compose connection issue
  • What is the difference between volumes-from and volumes?
  • Can I use Docker Compose to provision Vagrant directly?
  • Airflow Docker Deployment: Task Not Getting Run After start_date + schedule_interval
  • FROM parent
    ENTRYPOINT ["child-entry"]

    As far as I have tested it the entrypoint of the child image overwrites the one in the parent image.

    But since I am new to Docker I am not sure about this. My research also hasn’t yet resulted in a satisfying answer. So is the assumption above correct?

  • What does docker use for (image) versioning?
  • Securing docker containers
  • An asp.net core web API with swagger doesn’t work in Docker in Azure
  • Concourse ci resolve docker hostname
  • Ansible docker module missing CP command?
  • Docker not port forwarding correctly?
  • One Solution collect form web for “What happens to entrypoint of Docker parent image when child defines another one?”

    The last entrypoint is used, only the last one.

    You can check, put several lines with different ENTRYPOINT in your Dockerfile, and check what happens.

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