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
• 15,040 points

1 answer to this question.

+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

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 


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,810 points
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
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,900 points
0 votes
2 answers

What is git rebasing?

In Git, there are two main ways ...READ MORE

answered Aug 2 in Git & GitHub by Sirajul
• 29,340 points