New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hot reload 在 docker 中是不是无效 #200
Comments
可能和容器有关。Hot reload 是用操作系统的 inotify api 实现的。容器场景下overlayfs的变化可能无法感知
…---Original---
From: ***@***.***>
Sent at: 2022年11月2日(Wed) PM2:02
To: ***@***.***>;
Cc: ***@***.***>;
Subject: [rapiz1/rathole] hot reload 在 docker 中是不是无效 (Issue #200)
运行 docker run -it --rm -v "path/to/config.toml:/app/config.toml" rathole --server /app/config.toml
然后修改 path/to/config.toml,但是并没有触发 reload,只有重启上面运行的 container 才生效
是哪里没有配置好吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
以后会考虑在 rapiz1/rathole 镜像中加入 inotify-tools 吗 |
你确认过这样可以解决问题吗?我没有调查过。如果可以修复,可以加入镜像 |
尝试生成镜像来测试,不过报下面错误,怎么解决
|
https://github.com/rapiz1/rathole/blob/fix-dockerfile/Dockerfile 试试这个 Dockerfile |
Dockerfile 可以了,不幸的是在镜像中加入 inotify-tools 并启动服务后还是无法 hot reload |
应该是 docker 阻碍了 inotify 事件的传递 |
按照上面说的,映射了整个文件夹,然后就生效了,太棒了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
运行 docker run -it --rm -v "path/to/config.toml:/app/config.toml" rathole --server /app/config.toml
然后修改 path/to/config.toml,但是并没有触发 reload,只有重启上面运行的 container 才生效
是哪里没有配置好吗?
The text was updated successfully, but these errors were encountered: