Skip to content

Docker image for using apache + php7. You can copy your website to the container.

License

Notifications You must be signed in to change notification settings

demid1984/docker_apache_php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker_apache_php

Docker image for using apache 2.4.46 + php 7.4.15. You can copy your website to the container.

How to run it on your computer?

  • create docker image, for example by cmd
docker build -t apache-php-alpine:latest .
  • create docker container from image
docker create --name apache apache-php-alpine
  • start container
docker start apache

There is the simplest way to start the image. It has a default page 'It works!' and a 'index.php' page with php info.

How to add my website to a container?

  • create docker image(see previous section)
  • create docker container
docker create -h [YOUR CONTAINER HOSTNAME] -e DOCUMENT_ROOT=[ENTRY POINT DIRECTORY NAME, default public_html] --name apache apache-php-alpine
  • copy your zip website to the container
docker cp web.zip apache:/home/myapp.example.com.zip

You should copy your zip file to /home direcory with name same as CONTAINER HOSTNAME

  • start container
docker start apache

About

Docker image for using apache + php7. You can copy your website to the container.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published