Skip to content

Command-line Arguments for /Applications/Docker.app/Contents/MacOS/Docker  #2359

Closed

Description

@rfay

Expected behavior

Docker for Mac 18.09.* [edit 2019-02-03]

Could you please let me know the allowed command-line arguments for /Applications/Docker.app/Contents/MacOS/Docker? I know that these sort-of work:

/Applications/Docker.app/Contents/MacOS/Docker --unattended
/Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended

but only because I happened to find a reference to them in #882 (comment)

Currently I can sudo run /Applications/Docker.app/Contents/MacOS/Docker --unattended
in a headless environment, but only with sudo, and really want to know how to do it to set up docker for a normal user. (For testing on CircleCI)

Actual behavior

Information

  • Full output of the diagnostics from "Diagnose & Feedback" in the menu
  • A reproducible case if this is a bug, Dockerfiles FTW
  • Page URL if this is a docs issue or the name of a man page

Steps to reproduce the behavior

  1. ...
  2. ...

Activity

  1. docker-robott commented on Apr 16, 2018

    @docker-robott
    Collaborator

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale comment.
    Stale issues will be closed after an additional 30d of inactivity.

    Prevent issues from auto-closing with an /lifecycle frozen comment.

    If this issue is safe to close now please do so.

    Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
    /lifecycle stale

  2. GabLeRoux commented on Jul 26, 2018

    @GabLeRoux

    I just learned about the --unattended parameter a bit like you and was curious if I could run Docker for mac on Travis, but that's not possible due to Incompatible CPU:

    +brew cask install docker
    ==> Satisfying dependencies
    ==> Downloading https://download.docker.com/mac/stable/23751/Docker.dmg
    ==> Verifying checksum for Cask docker
    ==> Installing Cask docker
    ==> Moving App 'Docker.app' to '/Applications/Docker.app'.
    🍺  docker was successfully installed!
    +docker system info
    +sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended
    +sleep 1
    Settings: >>> New settings saved <<<
    Settings: linuxDaemonConfigCreationDate : 2018-07-26 15:40:23 +0000
    Settings: <<< New settings saved >>>
    CrashReport: stderr redirected to /var/root/Library/Group Containers/group.com.docker/DockerAppStderr.txt
    FeaturesStateLoader: featuresState saved
    AppDelegate: Application version: 18.03.0-ce-mac60 (23751)
    AppDelegate: Channel: stable
    AppDelegate: Administrator user: true
    OSX Version: Version 10.13.3 (Build 17D47)
    Terminator: Incompatible CPU detected.
    We are sorry, but your hardware is incompatible with Docker for Mac.
    Docker requires a processor with virtualization capabilities and hypervisor support.
    To learn more about this issue see:
    [https://docs.docker.com/docker-for-mac/troubleshoot](https://docs.docker.com/docker-for-mac/troubleshoot/#incompatible-cpu-detected)
    
  3. rfay commented on Feb 3, 2019

    @rfay
    Author

    /remove-lifecycle stale

  4. rfay commented on Feb 3, 2019

    @rfay
    Author

    /lifecycle frozen

  5. rfay commented on Feb 27, 2019

    @rfay
    Author

    For the basic question of "How to install docker-for-mac from the command line" this currently works:

    brew cask install docker
    sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended
    nohup /Applications/Docker.app/Contents/MacOS/Docker --unattended &
    

    https://github.com/drud/ddev/blob/fe1b8ddbfeb322e4966b31c5654362f6a0b022be/.circleci/macos_circle_vm_setup.sh#L11-L13

  6. rfay commented on Jul 31, 2019

    @rfay
    Author

    Unfortunately, this ceases working in Docker Desktop for Mac 2.1.0.0 (docker v19.03.1). Now you get the error message:

    DockerApplication: Docker.app starting for root
    Terminator: Running Docker Desktop as root is dangerous. Please run it as a regular user.
    

    Which breaks our CI :( For now, I can download earlier version, but Docker folk... please tell us how to do an unattended installation!

  7. rfay commented on Jul 31, 2019

    @rfay
    Author

    /remove-lifecycle frozen

  8. rfay commented on Jul 31, 2019

    @rfay
    Author

    /iifecycle frozen

  9. apolishch commented on Oct 5, 2019

    @apolishch

    Any plans to get this addressed? I'm still being hit with this in CI

  10. msmoljan commented on Nov 22, 2019

    @msmoljan

    Fixing this would be extremely helpful for our CI workflow too.

    Currently I'm using this workaround from @rfay as a temporary fix:
    https://github.com/drud/ddev/pull/1748/files#diff-19288f650af2dabdf1dcc5b354d1f245

  11. 39 remaining items

  12. armenzg commented on Oct 27, 2021

    @armenzg

    I've verified that @gwynne 's fix works on Github's macos-11 runners.

  13. knksmith57 commented on Nov 4, 2021

    @knksmith57

    @gwynne's work around is awesome and we can confirm it is working for us on macOS 11.16.1 w/ Docker Desktop 4.1.0 🚀 (huge thanks for that! 🙏 )

    note: after a system reboot, the license accept didn't "stick" and the re-launched Docker.app prompted for license acceptance. I'm guessing if one always opened Docker.app with the --unattended and --accept-license flags that this would continue to Just Work™️, but note that launching with this workaround doesn't appear to permanently dismiss the prompt.

  14. joffrey-bion commented on Nov 18, 2021

    @joffrey-bion

    @gwynne's solution did work for me as well, although indeed it took 9m49s to run 😭
    The previous script I was using took about 1m30s, but well at least this new one works.

    Every independent developer needs to do this on Github Actions, which is a bit ridiculous...
    Why not just allow them to preinstall the software?

  15. armenzg commented on Nov 19, 2021

    @armenzg

    I filed it here in case you want to up-vote it.

  16. MaceWindu commented on Nov 19, 2021

    @MaceWindu

    @armenzg , that's a wrong place to request it as it's blocked on Docker side by their EULA:
    actions/runner-images#4399 (comment)
    actions/runner-images#2150 (comment)

  17. armenzg commented on Nov 19, 2021

    @armenzg

    Thanks @MaceWindu !

  18. sparty02 commented on Dec 12, 2021

    @sparty02

    the above comment worked great, but I happened to have HOMEBREW_CASK_OPTS="--appdir=~/Applications", so the app directory where the docker cask gets installed is a bit different. In that respect, I updated the script a bit to lookup the appdir.

    #!/usr/bin/env bash
    
    brew install --cask docker
    docker_app_path=$(brew list --cask docker | grep '==> App' -A1 | tail -n 1 | awk '{ print $1 }')
    docker_app_path="${docker_app_path/#\~/$HOME}"
    
    sudo "$docker_app_path"/Contents/MacOS/Docker --unattended --install-privileged-components
    open -a "$docker_app_path" --args --unattended --accept-license
    while ! "$docker_app_path"/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done
  19. added a commit that references this issue on Dec 20, 2021
  20. stephen-turner commented on Apr 8, 2022

    @stephen-turner
    Contributor

    This is mostly fixed in Docker Desktop 4.7.0. Let's move the discussion to docker/roadmap#80.

  21. rfay commented on May 6, 2022

    @rfay
    Author

    @stephen-turner installation is fixed. I don't see anything in the docs about how to start Docker Desktop from the command line. Am I just missing something? This issue is largely about being able to start/stop Docker Desktop. DDEV's tests would be far more stable if I could stop and start Docker Desktop before every test run.

  22. stephen-turner commented on May 6, 2022

    @stephen-turner
    Contributor

    You're right, we don't have that part yet, that's docker/roadmap#172.

  23. docker-robott commented on Jun 5, 2022

    @docker-robott
    Collaborator

    Closed issues are locked after 30 days of inactivity.
    This helps our team focus on active issues.

    If you have found a problem that seems similar to this, please open a new issue.

    Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
    /lifecycle locked

  24. locked and limited conversation to collaborators on Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions