How to “import” xdebug into existing php docker container











up vote
0
down vote

favorite












I have a docker-compose.yml with a php container that already exists insid::



version: "2"

services:
php:
image: wodby/drupal-php:5.6-3.3.1
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
PHP_FPM_CLEAR_ENV: "no"
DB_HOST: mariadb
DB_USER: drupal
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
volumes:
- docker-sync:/var/www/html


I need to install xdebug onto the docker container so that I can then use it with PHPStorm.



A lot of tutorials ar using a Dockerfile is needed to create a php image with xdebug on it. I have not used docker for more than hosting my project locally so I am confused to how the Dockerfile comes into play and if you can use a Dockerfile with a docker-compose file as well.



Does anyone know the steps I need to take in order to add xdebug to this existing container



I am using the following stack: https://github.com/wodby/docker4drupal










share|improve this question






















  • Does this help? github.com/Wodby/drupal-php/issues/1#issuecomment-250981261
    – Jeff Harris
    Nov 7 at 22:06










  • oh man, if it is actually that simple that would be amazing
    – J. E
    Nov 9 at 15:47















up vote
0
down vote

favorite












I have a docker-compose.yml with a php container that already exists insid::



version: "2"

services:
php:
image: wodby/drupal-php:5.6-3.3.1
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
PHP_FPM_CLEAR_ENV: "no"
DB_HOST: mariadb
DB_USER: drupal
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
volumes:
- docker-sync:/var/www/html


I need to install xdebug onto the docker container so that I can then use it with PHPStorm.



A lot of tutorials ar using a Dockerfile is needed to create a php image with xdebug on it. I have not used docker for more than hosting my project locally so I am confused to how the Dockerfile comes into play and if you can use a Dockerfile with a docker-compose file as well.



Does anyone know the steps I need to take in order to add xdebug to this existing container



I am using the following stack: https://github.com/wodby/docker4drupal










share|improve this question






















  • Does this help? github.com/Wodby/drupal-php/issues/1#issuecomment-250981261
    – Jeff Harris
    Nov 7 at 22:06










  • oh man, if it is actually that simple that would be amazing
    – J. E
    Nov 9 at 15:47













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a docker-compose.yml with a php container that already exists insid::



version: "2"

services:
php:
image: wodby/drupal-php:5.6-3.3.1
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
PHP_FPM_CLEAR_ENV: "no"
DB_HOST: mariadb
DB_USER: drupal
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
volumes:
- docker-sync:/var/www/html


I need to install xdebug onto the docker container so that I can then use it with PHPStorm.



A lot of tutorials ar using a Dockerfile is needed to create a php image with xdebug on it. I have not used docker for more than hosting my project locally so I am confused to how the Dockerfile comes into play and if you can use a Dockerfile with a docker-compose file as well.



Does anyone know the steps I need to take in order to add xdebug to this existing container



I am using the following stack: https://github.com/wodby/docker4drupal










share|improve this question













I have a docker-compose.yml with a php container that already exists insid::



version: "2"

services:
php:
image: wodby/drupal-php:5.6-3.3.1
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
PHP_FPM_CLEAR_ENV: "no"
DB_HOST: mariadb
DB_USER: drupal
DB_PASSWORD: drupal
DB_NAME: drupal
DB_DRIVER: mysql
volumes:
- docker-sync:/var/www/html


I need to install xdebug onto the docker container so that I can then use it with PHPStorm.



A lot of tutorials ar using a Dockerfile is needed to create a php image with xdebug on it. I have not used docker for more than hosting my project locally so I am confused to how the Dockerfile comes into play and if you can use a Dockerfile with a docker-compose file as well.



Does anyone know the steps I need to take in order to add xdebug to this existing container



I am using the following stack: https://github.com/wodby/docker4drupal







php docker docker-compose phpstorm xdebug






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 7 at 21:19









J. E

113




113












  • Does this help? github.com/Wodby/drupal-php/issues/1#issuecomment-250981261
    – Jeff Harris
    Nov 7 at 22:06










  • oh man, if it is actually that simple that would be amazing
    – J. E
    Nov 9 at 15:47


















  • Does this help? github.com/Wodby/drupal-php/issues/1#issuecomment-250981261
    – Jeff Harris
    Nov 7 at 22:06










  • oh man, if it is actually that simple that would be amazing
    – J. E
    Nov 9 at 15:47
















Does this help? github.com/Wodby/drupal-php/issues/1#issuecomment-250981261
– Jeff Harris
Nov 7 at 22:06




Does this help? github.com/Wodby/drupal-php/issues/1#issuecomment-250981261
– Jeff Harris
Nov 7 at 22:06












oh man, if it is actually that simple that would be amazing
– J. E
Nov 9 at 15:47




oh man, if it is actually that simple that would be amazing
– J. E
Nov 9 at 15:47

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53197983%2fhow-to-import-xdebug-into-existing-php-docker-container%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53197983%2fhow-to-import-xdebug-into-existing-php-docker-container%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Academy of Television Arts & Sciences

L'Équipe

1995 France bombings