美文网首页
Laradock 域名污染问题

Laradock 域名污染问题

作者: MrBaoquan | 来源:发表于2021-02-07 11:44 被阅读0次

报错症状:

Failed to connect to raw.githubusercontent.com port 443: Connection refused

解决方案

打开 https://www.ipaddress.com/ 输入访问不了的域名 raw.githubusercontent.com

  • 查询到的真实ip地址

宿主机 hosts 添加

199.232.96.133 raw.githubusercontent.com

Dockerfile添加

# Dockfile
# laradock测试时,这条命令需要和curl在同一个RUN命令下一起执行才有效, 写在其他地方无效
RUN echo '199.232.96.133 raw.githubusercontent.com' >> /etc/hosts \
  &&  curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

相关文章

网友评论

      本文标题:Laradock 域名污染问题

      本文链接:https://www.haomeiwen.com/subject/xkhztltx.html