What ENTRYPOINT commands are needed in the dockerfile that adds php files into a container

+1 vote

I have created a Dockerfile that adds the php files into the devopsedu/webapp container. Could you please let me know how to start the php service now? What I mean is that what should be my ENTRYPOINT commands in the Dockerfile?

Dec 13, 2018 in Git & GitHub by Hannah
• 14,080 points
132 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
Best answer

Hope you are doing good!

In this step, you have to create a dockerfile and the base image should be devopsedu/webapp. And you have to write dockerfile in such a way that it should run the PHP application. Please find the below sample docker file which uses devopssedu/webapp as the base image and then it runs the PHP application. 

FROM devopsedu/webapp 
ADD proj /var/www/html
RUN rm /var/www/html/index.html
CMD apachectl -D FOREGROUND

Create a docker file as mentioned above and continue with the next steps of the project.

I hope this helps.

answered Dec 16, 2018 by Kiyara

selected May 20 by Kalgi

which files form given sample website repository need to be added under 

/var/www/html

Please elaborate a little bit here.

Hey Harish, /var/www/html is the directory where your website files are stored. These files include the codes, images etc used for the website.

How does this docker file run the php application? Is the application code inside the image? What about the application in https://github.com/edureka-devops/projCert . I'm bit confused. Pls clarify.

The application code is moved or copied inside the container and a docker image is build. An image is created. Now when you run this image, the php application will get executed.

Related Questions In Git & GitHub

0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,670 points
72 views
0 votes
1 answer

what are these - @@--@@ in github

This statement is called the hunk header. You ...READ MORE

answered Jun 27, 2018 in Git & GitHub by anonymous
13 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,140 points
79 views
0 votes
1 answer

What is git rebasing?

Git rebasing is moving or combining different ...READ MORE

answered Dec 16, 2018 in Git & GitHub by Kiyara
59 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.