GithubHelp home page GithubHelp logo

isabella232 / wordpress-xdebug Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automattic/wordpress-xdebug

0.0 0.0 0.0 13 KB

A WordPress+xdebug docker image

License: GNU General Public License v2.0

Dockerfile 100.00%

wordpress-xdebug's Introduction

Wordpress and XDebug Docker image

Usage

Use the environment variable XDEBUG_CONFIG tu configure the XDebug PHP extension.

Docker Compose

Example configuration file docker-compose.yml:

version: '3.3'

services:
  db:
    image: mysql:5.7
    restart: on-failure
    environment:
      MYSQL_ROOT_PASSWORD: somewordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress

  wp:
    depends_on:
    - db
    image: automattic/wordpress-xdebug
    volumes:
    - ./wp:/var/www/html
    ports:
    - 8080:80
    restart: on-failure
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      XDEBUG_CONFIG: remote_host=host.docker.internal

Usage with VSCode

To use XDebug in VSCode you need the PHP Debug extension.

You also need to make VSCode map the paths on the container to the ones on the host, you have to set the pathMappings settings in your launch.json.

Example configuration file .vscode/launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "request": "launch",
      "port": 9000,
      "pathMappings": {
        "/var/www/html": "${workspaceRoot}/wp",
      }
    }
  ]
}

Docker Hub

Published as automattic/wordpress-xdebug in Docker Hub.

How to publish a new build on Docker Hub

  1. Create a Pull Request bumping the version in Dockerfile for the wordpress image tag on Automattic/wordpress-xdebug to get a new build done automatically. See latest builds of automattic/wordpress-xdebug here.
  2. Merge the PR (if you're an Automattician)
  3. Using GitHub's Interface, create a release pointing to master and with the release tag matching the version you justed bumped to in the Dockerfile. e.g. so it reads FROM wordpress:5.6.1. image
  4. That's it, now automattic/wordpress-xdebug:latest and automattic/wordpress-xdebug:5.6.1 will both refer to the new build based on the wordpress:5.6.1 tag.

License

GPL v2

Based on previous work from andreccosta/wordpress-xdebug

wordpress-xdebug's People

Contributors

naxoc avatar oskosk avatar

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.