# 由于 Docker 网络参数，Launcher 重建在 Docker 19.03.0 下失败

**URL:** <https://meta.discourse.org/t/launcher-rebuild-fails-with-docker-19-03-0-due-to-docker-network-parameter/123696>\
**Category:** Product Support\
**Created:** [2019 年7 月 23 日 01:13 UTC](https://meta.discourse.org/t/launcher-rebuild-fails-with-docker-19-03-0-due-to-docker-network-parameter/123696 "2019-07-23T01:13:41Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

作者： ![fpellet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fpellet/32/166923_2.png) [@fpellet](https://meta.discourse.org/u/fpellet)\
发布日期： [2019 年8 月 4 日 08:02 UTC](https://meta.discourse.org/t/launcher-rebuild-fails-with-docker-19-03-0-due-to-docker-network-parameter/123696/5 "2019-08-04T08:02:54Z")

</div>

我也遇到了同样的问题。  
@codinghorror 以下是复现步骤以及修复此回归问题的线索：

复现步骤：

1. 在容器配置（app）中设置：  
`docker_args: "--network reverse-proxy"`
2. 重新构建  
`./launcher rebuild app`
3. 查看错误  
`/usr/bin/docker: --network 不是有效的 MAC 地址`

这是一个由提交 bfc79e7 引入的 bug（[https://github.com/discourse/discourse\_docker）](https://github.com/discourse/discourse_docker%EF%BC%89)  
`merge_user_args` 由 `set_template_info` 调用，但在重新构建时（`run_run` 和 `run_bootstrap`），`set_template_info` 会被调用两次。  
因此，原本应该是 `user_args` 等于 `$user_args $docker_args`，结果却变成了 `$user_args $docker_args $docker_args`。

Docker 不允许多次配置相同的网络：  
`docker: network "reverse-proxy" is specified multiple times`

感谢回退此提交，或者使 `merge_user_args` 具备幂等性。

---

_[View the full topic](https://meta.discourse.org/t/launcher-rebuild-fails-with-docker-19-03-0-due-to-docker-network-parameter/123696)._
