Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use non-detached mode as default for service commands #525

Merged
merged 1 commit into from
Sep 13, 2017

Commits on Sep 13, 2017

  1. Use non-detached mode as default for service commands

    Commit 330a003 added a `--detach=false` option
    to various service-related commands, with the intent to make this the default in
    a future version (17.09).
    
    This patch changes the default to use "interactive" (non-detached), allowing
    users to override this by setting the `--detach` option.
    
    To prevent problems when connecting to older daemon versions (17.05 and below,
    see commit db60f25), the detach option is
    ignored for those versions, and detach is always true.
    
    Before this change, a warning was printed to announce the upcoming default:
    
        $ docker service create nginx:alpine
        saxiyn3pe559d753730zr0xer
        Since --detach=false was not specified, tasks will be created in the background.
        In a future release, --detach=false will become the default.
    
    After this change, no warning is printed, but `--detach` is disabled;
    
        $ docker service create nginx:alpine
        y9jujwzozi0hwgj5yaadzliq6
        overall progress: 1 out of 1 tasks
        1/1: running   [==================================================>]
        verify: Service converged
    
    Setting the `--detach` flag makes the cli use the pre-17.06 behavior:
    
        $ docker service create --detach nginx:alpine
        280hjnzy0wzje5o56gr22a46n
    
    Running against a 17.03 daemon, without specifying the `--detach` flag;
    
        $ docker service create nginx:alpine
        kqheg7ogj0kszoa34g4p73i8q
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed Sep 13, 2017
    Configuration menu
    Copy the full SHA
    0c27355 View commit details
    Browse the repository at this point in the history