Comments (4)
If someone else gets here, I got this working by replacing the remote_host
at the ENTRYPOINT
:
docker-entrypoint.sh
#!/usr/bin/env sh
echo "yasd.remote_host=$(getent hosts host.docker.internal | awk '{print $1}')" >> "$PHP_INI_DIR/conf.d/99_overrides.ini"
php "$@"
Dockerfile
FROM phpswoole/swoole:4.6-php7.4-alpine
RUN apk add boost-dev
RUN wget -c https://github.com/swoole/yasd/archive/refs/tags/v0.3.7.tar.gz -O - | tar -xz \
&& docker-php-source extract \
&& mv yasd-0.3.7 /usr/src/php/ext/yasd \
&& docker-php-ext-install yasd
RUN { \
echo "yasd.debug_mode=remote"; \
echo "yasd.remote_host=0.0.0.0"; \
echo "yasd.remote_port=9000"; \
} | tee "$PHP_INI_DIR/conf.d/99_overrides.ini"
ADD docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT [ "sh", "-c", "/docker-entrypoint.sh" ]
docker-compose.yml
version: '3.8'
services:
dev:
container_name: coroutine_context_api
tty: true
build: .
volumes:
- ./:/var/www
environment:
- PHP_IDE_CONFIG=serverName=CoroutineContextAPI
The PHP_IDE_CONFIG
is important to have your paths mapped.
from yasd.
自己琢磨一下:
Invalid address/ Address not supported: No error information
这个错误
可以使用 init_file 添加 setRemoteHost 解决。
然而 swoole 没有启动,也没有任何报错。
/www/2021/mermber-center # php -e bin/hyperf.php start
[yasd] execute init_file success
希望作者完善文档吧,目前在docker下确实不知道怎么使用?
from yasd.
加我微信: codinghuang
from yasd.
If someone else gets here, I got this working by replacing the
remote_host
at theENTRYPOINT
:docker-entrypoint.sh
#!/usr/bin/env sh echo "yasd.remote_host=$(getent hosts host.docker.internal | awk '{print $1}')" >> "$PHP_INI_DIR/conf.d/99_overrides.ini" php "$@"Dockerfile
FROM phpswoole/swoole:4.6-php7.4-alpine RUN apk add boost-dev RUN wget -c https://github.com/swoole/yasd/archive/refs/tags/v0.3.7.tar.gz -O - | tar -xz \ && docker-php-source extract \ && mv yasd-0.3.7 /usr/src/php/ext/yasd \ && docker-php-ext-install yasd RUN { \ echo "yasd.debug_mode=remote"; \ echo "yasd.remote_host=0.0.0.0"; \ echo "yasd.remote_port=9000"; \ } | tee "$PHP_INI_DIR/conf.d/99_overrides.ini" ADD docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT [ "sh", "-c", "/docker-entrypoint.sh" ]docker-compose.yml
version: '3.8' services: dev: container_name: coroutine_context_api tty: true build: . volumes: - ./:/var/www environment: - PHP_IDE_CONFIG=serverName=CoroutineContextAPIThe
PHP_IDE_CONFIG
is important to have your paths mapped.
Yes, thank you! It's working
from yasd.
Related Issues (20)
- MacbookPro16(Intel) macOs Monterey 安装php7.4.26后报错 HOT 3
- Yasd don't reload breakpoints with Swoole hot reloading HOT 1
- wsl2 ubuntu20.04 环境下 yasd 调试异常 HOT 9
- using Yasd widh curl or requests form browser / PHPStorm HOT 1
- View private properties of parent class will crashed HOT 2
- macos(M1X) + yasd + hyperf debug报错 HOT 5
- Undefined constant "request" HOT 3
- 请问下怎么解决单元测试覆盖率问题 HOT 5
- "php -e" debug with VsCode and Docker Alpine error "Segmentation fault" HOT 1
- Can not check the value of static variables in a class HOT 1
- M2 编译失败(M2 Compilation fails) HOT 9
- 能够进入,但是执行下一步,就会报这个错误。php代码没问题。 HOT 15
- Undefined constant "this" in yasd://debug-eval:1 HOT 5
- 大佬 这个报错啥原因呢 HOT 1
- It's not possible to compile in the php:8.1-cli-alpine3.17 HOT 1
- centos7 php7.2下编译失败
- output:Segmentation fault HOT 10
- There is an error in the compilation(make) HOT 3
- mark error ( errors generated. make: *** [src/remote_debugger.lo] Error 1 ) HOT 2
- make test 失败率90% ,php -e 报Segmentation fault 安装完后不能正常使用。 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yasd.