为什么Traefik提供的内容会被截断?

我在我的开发环境中的几个docker容器前面有一个Traefik反向代理。

我最近注意到,通过端口80(Traefik)服务时,大文件正在被切断。 但是,如果我使用Docker容器上的本地HTTP端口下载文件,则文件没问题。

这似乎只影响超过一定大小的文件。

我在我的一个Docker容器上生成了一个大文件。

for ((i=1;i<=200000;i++)); do echo "$i some new line that has a reasonably long length and content" >> public/large-file.txt; done 

如果我curl文件并绕过Traefik(此容器上的端口4200),该文件是完整的,每次相同的确切大小。 如果我通过Traefik通过端口80 curl文件,该文件在一个看似随机的地方被切断。

 $ curl -O http://localhost/large-file.txt; cat large-file.txt ... 114633 some new line that has a reasonably long length and content 114634 some new line that has a reasonably long length and content 114635 some new line that has a rea $ curl -O http://localhost/large-file.txt; cat large-file.txt ... 199732 some new line that has a reasonably long length and content 199733 some new line that has a reasonably long length and content 199734 some new line that has a re 

基于这种行为,在我看来,这不是一个Docker的问题,而不是我的networking服务器的问题。 相反,Traefik似乎有错。

这是Traefik中的错误,还是可能的错误configuration?

我注意到我的Traefik版本是v1.5.0-rc1 / cancoillotte ,这个版本在写这篇文章的时候已经在一个星期前发布了。 这是目前最新的containous/traefik Docker库的标签。

我以前没有意识到这一点,但在我docker-compose.yml使用的Traefik图像不是来自_/traefik的“官方”Docker库 。 相反,它来自于trafik团队在containous/traefik 的图书馆 。

containus/traefik的图像给出以下警告:

Traefik非官方形象(请使用官方形象,而不是https://hub.docker.com/r/_/traefik

看起来奇怪的是,他们警告不要使用这些图像,考虑到Docker回购由Trafik背后的遏制者所拥有的。 也许回购是为了出血的边缘构build? 我不确定,但很显然,他们警告用户不要使用这些图像。

我切换到官方Docker库图像,恰巧使用v1.4.4 / roquefort作为latest标签。

这个问题似乎已经消失了。