Giter Club home page Giter Club logo

docker-apache-php's Introduction

Apache and php on docker tailored for Drupal/Wordpress

Tags

  • php7, latest,
  • php5,
  • xdebug, xdebug-php5, //default php version is php7
  • xhprof-php5 // xhprof does not support php7 out of the box at this time

Installation / Usage

  1. Install the droptica/apache-php container:

    $ docker pull droptica/apache-php

Alternatively, pull a specific version of droptica/apache-php: sh $ docker pull droptica/apache-php:xdebug-php5

  1. Download drupal to a folder of your choosing

  2. Run the containter

    $ docker run -p 8080:80 -v /my-folder/with-drupal:/var/www/html droptica/apache-php:xdebug
    

    or if you are in the drupal folder you can

    $ docker run -p 8080:80 -v $(pwd):/var/www/html droptica/apache-php:xdebug
    

    In your browser go to http://localhost:8080 and see your drupal there

  3. Docker compose Most of the time you would also want database and perhaps other containers (eg.mysql, phpmyadmin):

web: image: droptica/apache-php volumes: - ./dir-with-drupal:/var/www/html links: - mysql:mysql environment:

DOCUMENT_ROOT: /var/www/html

mysql: image: mysql:5.6 volumes:

- ./dir-for-persistent-database-files:/var/lib/mysql

environment:
  MYSQL_ROOT_PASSWORD: root-password
  MYSQL_DATABASE: db
  MYSQL_USER: user
  MYSQL_PASSWORD: password

phpmyadmin: image: nazarpc/phpmyadmin links: - mysql:mysql ``` run

docker-compose up

Configuration

  • ENV DOCUMENT_ROOT // allows to specify path for document root different then /var/www/html

docker-apache-php's People

Contributors

maciejlukianski avatar

Watchers

 avatar

Forkers

nazgolze

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.