# 由于 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:** 8

<div class="post-metadata">

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

</div>

这是一个补丁：

> <https://github.com/discourse/discourse_docker/pull/438>
>
> The \`merge\_user\_args\` function may be called more than once within a single \`lau…ncher\` process. e.g.: on \`launcher rebuild ...\`:
> 
> \`\`\`
> \[main\] -\> rebuild -\> run\_bootstrap -\> set\_template\_info -\> merge\_user\_args
> \[main\] -\> rebuild -\> run\_start -\> set\_template\_info -\> merge\_user\_args
> \`\`\`
> 
> If the user had included a \`docker\_args\` map key in their container YAML, the \`user\_args\` global would be incorrectly populated with duplicate docker CLI flags.
> 
> https://meta.discourse.org/t/-/123696
> 
> Fixes a regression introduced in https://meta.discourse.org/t/-/49401/9

应用该补丁，并在容器定义中设置 `docker_args` 键后，最终的 `docker run` 参数向量大致如下：

```plaintext
/usr/bin/docker run --shm-size=512m -d --restart=always -e ... -h saj-launcher-testing-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:07:fa:c6:c4:82 --network foonet local_discourse/app /sbin/boot

```

---

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