Docker Community Forums

Share and learn in the Docker community.

Help Mee please urgent


(Vuralcan) #1

I have php file for Linux. I want you to push this file or how can I push it and what are the ways of its. If you send me your e-mails, ı can send you the file. I know how I will create the image but I can not write Docker file. I don’t have any knowledge about how to write it inside of the file. This is my graduation project and I don’t have enough time. I am waiting for your helps.


(Kjanshair) #2

Hi @vuralcan,

First of all explore your question that what do you want to do? Where you want to push your PHP file? If you want to create an Docker image of your PHP app then writing Dockerfile is much faster and better solution than you think.
Write a Dockerfile for your PHP app with a base image such as php:7.0-apache which also contains the Apache Web Server to run your PHP script, copy your file contents to /usr/src/myapp, set the working directory to this directory run the script as CMD [ “php”, “./your-script.php” ] and build your image and you are up and running.