Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/means88/tiebabot-docker
TiebaBot in Docker
https://github.com/means88/tiebabot-docker
Last synced: about 10 hours ago
JSON representation
TiebaBot in Docker
- Host: GitHub
- URL: https://github.com/means88/tiebabot-docker
- Owner: Means88
- License: apache-2.0
- Created: 2015-12-27T08:11:41.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-27T08:19:31.000Z (about 9 years ago)
- Last Synced: 2025-01-09T09:10:43.934Z (1 day ago)
- Language: PHP
- Size: 62.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README-apache-php.md
- License: LICENSE-apache-php
Awesome Lists containing this project
README
tutum-docker-php
================Base docker image to run PHP applications on Apache
Building the base image
-----------------------To create the base image `tutum/apache-php`, execute the following command on the tutum-docker-php folder:
docker build -t tutum/apache-php .
Running your Apache+PHP docker image
------------------------------------Start your image binding the external ports 80 in all interfaces to your container:
docker run -d -p 80:80 tutum/apache-php
Test your deployment:
curl http://localhost/
Hello world!
Enable .htaccess files
------------------------------------If you app uses .htaccess files you need to pass the ALLOW_OVERRIDE environment variable
docker run -d -p 80:80 -e ALLOW_OVERRIDE=true tutum/apache-php
Loading your custom PHP application
-----------------------------------This image can be used as a base image for your PHP application. Create a new `Dockerfile` in your
PHP application folder with the following contents:FROM tutum/apache-php
After that, build the new `Dockerfile`:
docker build -t username/my-php-app .
And test it:
docker run -d -p 80:80 username/my-php-app
Test your deployment:
curl http://localhost/
That's it!
Loading your custom PHP application with composer requirements
--------------------------------------------------------------Create a Dockerfile like the following:
FROM tutum/apache-php
RUN apt-get update && apt-get install -yq git && rm -rf /var/lib/apt/lists/*
RUN rm -fr /app
ADD . /app
RUN composer install- Replacing `git` with any dependencies that your composer packages might need.
- Add your php application to `/app`