You may notice that when using docker service create
and update
, that the CLI acts differently for some Lectures then your own Docker. This is due to a change in the way Docker CLI shows the service commands in 2017.
--detach is a new option that changes the CLI response after you run a command.
This is a good thing, and doesn't affect the functionality of Swarm. It's just a UI difference. I use various 2017 versions of Docker in this course, so you may see different output for your own service create/update commands vs. mine, which is fine.
History of changes to CLI output for service create/update:
--detach
option, which defaulted to true
, but warned you each time about a future change to false
. The create/update commands were still asynchronous.--detach
default changes to false
, so you'll always see the UI wait synchronously while service tasks are deployed/updated, unless you set --detach true
in each command.For all stable versions after 17.12, just remember:
--detach true
if you're using automation or shell scripts to get things done.