What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hallo. Docker Sdk Installation (B2C, development mode). Xdebug configured upon the manual, nothing.

2

Comments

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    but ifconfig was installed all the time

  • then @UKHD8KTMF has to jump in. can’t reproduce from there

  • @UKHD8KTMF can you guide to make the check for the host detection in the sdk?

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UQS4LDZU7 can you please run echo $(ip route get 1 | sed 's/^.*src \([^ ]*\).*$/\1/;q')

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UKHD8KTMF sure. So its 192.168.224.19

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok, @UQS4LDZU7 look for deploy.bash.twig in you docker sdk folder and replace a line

    export SPRYKER_XDEBUG_HOST_IP=$(which ip >/dev/null 2>&1 &&  export SPRYKER_XDEBUG_HOST_IP=$(which ip >/dev/null 2>&1 && ifconfig $(ip r | grep default | awk '{print $5}') | grep "inet " | awk '{print $2}' || echo 'host.docker.internal') $(ip r | grep default | awk '{print $5}') | grep "inet " | awk '{print $2}' || echo 'host.docker.internal')
    
  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    with export SPRYKER_XDEBUG_HOST_IP=$(which ip >/dev/null 2>&1 && ifconfig $(ip r | grep default | awk '{print $5}') | grep "inet " | awk '{print $2}' || echo 'host.docker.internal')

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    and then run boostrap again

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    this will fix the issue

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UKHD8KTMF Thank you. Bootstrap didnt help, I will remove all images/containers and rebuild again

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    docker/sdk boostrap deploy.dev.yml and docker/sdk up

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes. It didnt work out

  • @UQS4LDZU7 Do you have maybe dns entries in your ~/.docker/daemon.json configuration? That was my problem with the debug session.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UNMDZHK46 Thank you. I will check.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UKHD8KTMF Thanks for the hints. I will try to make it work.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UNMDZHK46 No, i dont even have daemon.json

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ok. Now I have the right SPRYKER_XDEBUG_HOST_IP, run cli with -x option, but php -m still doesn't show xdebug in the list of php libraries.

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    hmm, works for me. Does it rebuild the container when you start cli with -x?

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    No, it doesnt by the way. Just says "DEBUGGING MODE"

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    are you shure that there is no xdebug when you run php -m inside cli container? It is the last on the list

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    something like

    [PHP Modules]
    bcmath
    bz2
    Core
    ctype
    curl
    date
    dom
    fileinfo
    filter
    ftp
    gd
    gmp
    hash
    iconv
    intl
    json
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_pgsql
    pdo_sqlite
    pgsql
    Phar
    posix
    readline
    redis
    Reflection
    session
    SimpleXML
    soap
    sockets
    sodium
    SPL
    sqlite3
    standard
    tokenizer
    xdebug
    xml
    xmlreader
    xmlwriter
    Zend OPcache
    zip
    zlib
    
    [Zend Modules]
    Xdebug
    Zend OPcache
    
  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Unfortunatelly:

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    hmm. wierd - did you modify stuff in docker sdk? Configs and stuff.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    No, I just used the deploy.dev.yml.

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    Sorry I am out of ideas. This works flawlessly for everyone I know.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    No prob. I will try further. Thx

  • "docker/sdk cli -x php -m" also shows the xdebug module. Did you clone the master branch of docker/sdk?

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited April 2020

    @UNMDZHK46 No, I didnt clone the master, as it wasnt master in the docs:

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet
    git clone git@github.com:spryker/docker-sdk.git -b 1.6.3 --single-branch docker