You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to have all the features that can be done via the GUI of Docker for Mac to some sort of CLI? This request is coming from an annoying issue from #412 that is holding back people who want to use their containers both for GNU/Linux and MacOS. Thank you!
There should be a way to install Docker For Mac as a service which runs at system startup.
Actual behavior
Docker for Mac Beta seems to require a ui based app "Docker.app" to run in a graphical user session. I could not figure out any way on how to start the Docker environment using cli tools.
The older Docker Toolbox allowed the use of e.g. docker-machine command to start its VirtualBox based environment. This allowed to create start-up scripts, to create a server ecosystem at system startup without a user to login.
Information
We'd like to use the great "Docker for Mac Beta" asap in a productive environment using the elegant integration with the native MacOS virtualization framework. So it would be of cause more robust and user friendly to install and run Docker and it's containers as system services automatically and independent on a user-login.
I tried to find suitable CLI tools in the Docker.app package but haven't been successful.
Is there any recommended way to install and run "Docker for Mac Beta" and its container as a service automatically at system startup?
Reacted by Gabriel Eisbruch, Martin M, Lyndsey Ferguson, jpascale and Flemming Jønsson
There is no short-term plan to add a command-line interface to Docker for Mac, so closing as "won't fix" (at least in the short/middle term). We understand that this is an important component for some use-cases, but we have no plans to work on this currently.
This is kind of insane. On one side you are developing a tool that is supposed to isolate apps/services and make it easy to deploy them everywhere but if it is about deploying the tool itself on a large number of macOS nodes than that is not supported and won't be.
Right now I am using Ansible to deploy D4M on the nodes and need to pause Ansible in order to configure it manually.
Any plans to make the D4M UI open source so that this feature could be contributed to you?
Hi Emmanuel,
this is really nice. Seems to work. Do you know whether it is as well
possible to extend for example the file sharing via command line?
Thanks a lot.
Martin
I really need to install Docker.app via the command line. sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended does not launch the tools needed. Unless I run the app by double clicking it in the GUI, docker ps complains about the daemon not running.
I use ansible to set up many Mac minis for Continuous Integration and it is not reasonable that I have to log into each machine via VNC to get Docker to completely install.
@lyndsey-ferguson the argument --quit-after-install shuts everything down after the installation. Try either removing this argument or re-launching the app using open /Applications/Docker.app (as a regular user i.e. without sudo) afterwards.
Thanks, I tried that but the Docker.app doesn't stops responding after a few seconds with 0% CPU activity. I left it running for 30 minutes with the thought that it was so busy that it was not responding on the main thread, but the "not responding" status (in the Activity Monitor app) did not change.
The problem was that, in my experimentation, I had started the /Library/LaunchDaemons/com.docker.vmnetd.plist LaunchDaemon. Unloading that allowed me to get this setup properly.
So in my setup we need to have an open session (logged in) with a specific user.
In order to properly configure Docker I need to run the app (with --quit-after-install --unattended) two times, once running as root user to configure properly the vmnetd daemon.
Afterwards I need to re-run it but as the user that will be logged-in to configure the rest (settings for D4M like CPUs, memory, etc.).
Configuring automatically additional mount points was as well not straight forward but after some time I figured out that the configuration itself is stored in a git repo (/Users/{{ docker_username }}/Library/Containers/com.docker.docker/Data/database/) in the following file /Users/{{ docker_username }}/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/mounts.
My custom launchd configuration as well looks a bit different:
If I don't specify the additional args I get after a reboot always the welcome dialog and Docker won't start-up (even if I disable the welcome message in the settings.json.
We managed to do an unattended install that automatically starts the Docker daemon and launches it on login without the "We are whaly happy to have you" popup.
Steps:
Install the Docker Desktop .dmg (we used 2.0.0.3)
Run /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended as root
Activity
dsheets commentedon Jan 16, 2017
#412 was resolved in Beta 33 and support was improved in Beta 35 or 36. Do you still need this functionality?
quantonganh commentedon Jan 19, 2017
Yes, I still need this.
Quoted from this: https://forums.docker.com/t/how-to-run-docker-for-mac-as-a-service-or-deamon/18728
Expected behavior
There should be a way to install Docker For Mac as a service which runs at system startup.
Actual behavior
Docker for Mac Beta seems to require a ui based app "Docker.app" to run in a graphical user session. I could not figure out any way on how to start the Docker environment using cli tools.
The older Docker Toolbox allowed the use of e.g. docker-machine command to start its VirtualBox based environment. This allowed to create start-up scripts, to create a server ecosystem at system startup without a user to login.
Information
We'd like to use the great "Docker for Mac Beta" asap in a productive environment using the elegant integration with the native MacOS virtualization framework. So it would be of cause more robust and user friendly to install and run Docker and it's containers as system services automatically and independent on a user-login.
I tried to find suitable CLI tools in the Docker.app package but haven't been successful.
Is there any recommended way to install and run "Docker for Mac Beta" and its container as a service automatically at system startup?
samoht commentedon Jan 31, 2017
There is no short-term plan to add a command-line interface to Docker for Mac, so closing as "won't fix" (at least in the short/middle term). We understand that this is an important component for some use-cases, but we have no plans to work on this currently.
martinm82 commentedon Aug 22, 2017
This is kind of insane. On one side you are developing a tool that is supposed to isolate apps/services and make it easy to deploy them everywhere but if it is about deploying the tool itself on a large number of macOS nodes than that is not supported and won't be.
Right now I am using Ansible to deploy D4M on the nodes and need to pause Ansible in order to configure it manually.
Any plans to make the D4M UI open source so that this feature could be contributed to you?
martinm82 commentedon Aug 23, 2017
lyndsey-ferguson commentedon Jan 1, 2018
I really need to install Docker.app via the command line.
sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattendeddoes not launch the tools needed. Unless I run the app by double clicking it in the GUI,docker pscomplains about the daemon not running.I use ansible to set up many Mac minis for Continuous Integration and it is not reasonable that I have to log into each machine via VNC to get Docker to completely install.
djs55 commentedon Jan 1, 2018
@lyndsey-ferguson the argument
--quit-after-installshuts everything down after the installation. Try either removing this argument or re-launching the app usingopen /Applications/Docker.app(as a regular user i.e. withoutsudo) afterwards.lyndsey-ferguson commentedon Jan 1, 2018
Thanks, I tried that but the Docker.app doesn't stops responding after a few seconds with 0% CPU activity. I left it running for 30 minutes with the thought that it was so busy that it was not responding on the main thread, but the "not responding" status (in the Activity Monitor app) did not change.
lyndsey-ferguson commentedon Jan 1, 2018
The problem was that, in my experimentation, I had started the
/Library/LaunchDaemons/com.docker.vmnetd.plistLaunchDaemon. Unloading that allowed me to get this setup properly.martinm82 commentedon Jan 2, 2018
So in my setup we need to have an open session (logged in) with a specific user.
In order to properly configure Docker I need to run the app (with
--quit-after-install --unattended) two times, once running as root user to configure properly thevmnetddaemon.Afterwards I need to re-run it but as the user that will be logged-in to configure the rest (settings for D4M like CPUs, memory, etc.).
Configuring automatically additional mount points was as well not straight forward but after some time I figured out that the configuration itself is stored in a git repo (
/Users/{{ docker_username }}/Library/Containers/com.docker.docker/Data/database/) in the following file/Users/{{ docker_username }}/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux/mounts.My custom launchd configuration as well looks a bit different:
If I don't specify the additional args I get after a reboot always the welcome dialog and Docker won't start-up (even if I disable the welcome message in the settings.json.
lyndsey-ferguson commentedon Jan 2, 2018
Thanks @martinm82, I will use that if we experience the same issue.
jensgreen commentedon Jun 27, 2019
We managed to do an unattended install that automatically starts the Docker daemon and launches it on login without the "We are whaly happy to have you" popup.
Steps:
/Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattendedas rootpgrep -q -f /Library/PrivilegedHelperTools/com.docker.vmnetd)~/Library/Group Containers/group.com.docker/settings.json:/usr/bin/open -g -j -a /Applications/Docker.apppgrep -q -f /Applications/Docker.app/Contents/MacOS/Docker)The Docker daemon is launched and starts up successfully after reboot.
rfay commentedon Jul 31, 2019
As mentioned in #2359 (comment) the
doesn't work any more in Docker Desktop 2.1.0.0 (docker v19.03.1). Now you get the error message:
Which breaks our CI :( For now, I can download earlier version, but Docker folk... please tell us how to do an unattended installation!
docker-robott commentedon Jun 21, 2020
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