This is exactly the same issue as #527, but when you have a stack.yaml that is Docker-enabled:
I falsely assumed that #527 was also about the Docker case, so please refer to #527 (comment) for a description of the problem.
This is the Docker issue that I believe would resolve this problem automatically if implemented: moby/moby#7567