-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
PHP代码中使用curl重启docker,nginx的IP会变 #91
Comments
可以配置静态IP。
然后设置nginx的静态IP:
再在php中设置extra_hosts:
最后重新build一下,就OK了。 |
composesr 应该装到php容器中。。因为composer安装的时候会出现php版本问题 |
能否做一个容器的hosts映射在宿主机,我现在开发的微服务环境需要经常在本机和内网环境中切换,如果有一个单独的容器hosts文件映射在宿主机会方便修改 |
可以在后面增加 --ignore-platform-reqs即可,这样可以忽略版本问题。 |
我下windows环境下配置了docker,安装DNMP成功,环境启动一切正常,但是需要一个功能使用curl功能,采用您说的方法后,可以设置成功,但是重启docker后,nginx的IP地址会改变,必须再重新设置,我这边应该如何配置可以使nginx的IP固定呢?
The text was updated successfully, but these errors were encountered: