Write an example dockerfile with 2 CMD, 2 ENTRYPOINT and 1 CMD/1 ENTRYPOINT and write down behavior of it.

DevOps

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

root@ip-172-31-28-155:/home/ubuntu/srm# cat dockerfile_multi
FROM ubuntu
MAINTAINER Rajesh Kumar << rajesh@scmgalaxy.com>>
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install tzdata
RUN apt-get install git -y && apt-get install -yq apache2
CMD echo "Hello CMD 1"
ENTRYPOINT ["/bin/echo", "Hello Entry 1"]

<strong>root@ip-172-31-28-155:/home/ubuntu/srm# docker run -it image_multi
Hello Entry 1 /bin/sh -c echo "Hello CMD 1"</strong>

root@ip-172-31-28-155:/home/ubuntu/srm# cat  dockerfile_multi
FROM ubuntu
MAINTAINER Rajesh Kumar << rajesh@scmgalaxy.com>>
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install tzdata
RUN apt-get install git -y && apt-get install -yq apache2
CMD echo "Hello CMD 1"
CMD echo "Hello CMD 2"

<strong>root@ip-172-31-28-155:/home/ubuntu/srm# docker run -it image_multi
Hello CMD 2</strong>

root@ip-172-31-28-155:/home/ubuntu/srm# cat  dockerfile_multi
FROM ubuntu
MAINTAINER Rajesh Kumar << rajesh@scmgalaxy.com>>
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install tzdata
RUN apt-get install git -y && apt-get install -yq apache2
ENTRYPOINT ["/bin/echo", "Hello Entry 1"]
ENTRYPOINT ["/bin/echo", "Hello Entry 2"]

<strong>root@ip-172-31-28-155:/home/ubuntu/srm# docker run -it image_multi
Hello Entry 2</strong>
Code language: PHP (php)