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

Provide CLI tool for finalizing install #717

Closed
timsutton opened this issue Sep 28, 2016 · 7 comments
Closed

Provide CLI tool for finalizing install #717

timsutton opened this issue Sep 28, 2016 · 7 comments

Comments

@timsutton
Copy link

Expected behavior

Docker for Mac could provide some CLI tool that enables sysadmins deploying Docker.app using automated tools to "complete" the installation, rather than requiring users to provide admin credentials to do so when the app is launched (either initially, or after updates requiring changes to system components).

Actual behavior

Docker for Mac currently provides no such utility.

Information

I originally thought the forum was the correct place to post such feedback, but my thread hasn't gotten any traction there. Please see this thread for more background:

https://forums.docker.com/t/feature-request-cli-tool-for-automated-installation/18334

If this is the preferred place to discuss such an option, I'm happy to continue that here.

There are a number of scenarios where it's great to be able to set up Docker automatically for all users on a system, or to be able to deploy it automatically for use by a Mac performing automated tasks such as CI. For example, I manage computer labs where Ruby and node are taught for web app development, but there are no admin users on those machines. I'm able to deploy Docker.app using a post-install script like the one I've added to the thread, using other tools (and I could see the advantage for those who use tools like Homebrew-cask) to make this automated. It would be great if people who do this don't have to own their own (possibly outdated or incorrect) versions of such scripts, but could simply call a known, supported executable (even if it's just a script like mine).

I think such a CLI tool would also be beneficial for repeated integration and user testing of Docker for Mac as well.

@samoht
Copy link
Contributor

samoht commented Jan 31, 2017

Thanks for your feature request. We understand that allowing to customize a Docker.app installation is very useful for the use-cases that you are describing, but unfortunately we have no plans to work on that feature in the short term (at least in the way that you are proposing).

So I will close that ticket for now on as "won't fix". Thanks again for your report!

@timsutton
Copy link
Author

Thanks @samoht for the acknowledgement!

I just want to clear up that I'm not really interested in "customizing" anything, just providing a way for those who are required to mass-deploy Docker for macOS - for centralized software offerings for developer laptops, or in educational environments with labs, for example - to do so without needing to "test" an installation and reverse all the steps for the installation of additional required components. There will certainly be organizations that do do this, and many of them will be figuring it out for themselves and not always "in sync" with changes to the app's requirements.

If Docker for Mac refactored its additional setup into a standalone executable (script or otherwise), then when the app in its common installation context goes to install the additional components it can simply call that executable, which can report success or failure.

@geisbruch
Copy link

geisbruch commented Jul 7, 2017

Hi I've found a way to use the internal DB of docker-for-mac to change some configurations (in fact mem & cpu) but you can change others

docker run --rm -it --net datakit-net --name datakit -v /Users/$(whoami)/Library/Containers/com.docker.docker/Data/database:/data datakit/db
docker run -it --privileged --net datakit-net datakit/client
##In the contaner
mkdir /db/branch/master/transactions/com.docker.driver.amd64-linux
cd /db/branch/master/transactions/com.docker.driver.amd64-linux/rw/com.docker.driver.amd64-linux
## Change amount of cpus
echo 4 > cd /db/branch/master/transactions/com.docker.driver.amd64-linux/rw/com.docker.driver.amd64-linux/ncpu
echo commit > /db/branch/master/transactions/com.docker.driver.amd64-linux/ctl

You can change other files also.

It's very tricky today but I will check if i can build a client to modify those files.

@justincormack
Copy link
Member

@geisbruch that interface may go away soon, it is not guaranteed to be stable.

@geisbruch
Copy link

@justincormack Absolutely, but in the meantime is something that could run, do you know if docker will reconsider add some kind of cli tool do reconfigure docker-for-mac ?

@pmarrone
Copy link

pmarrone commented Feb 14, 2018

@geisbruch These setting for the VM's RAM and CPUs seem to have been moved (using version 17.12.0-ce-mac49). Editing them looks much easier now, since they can now be found in a simple json file found under
/Users/$USER/Library/Group\ Containers/group.com.docker/settings.json where there are params like

  "cpus" : 4,
  "memoryMiB" : 4048,

Editing this file and relaunching Docker for Mac seem to make them take effect.
I know the settings interface may still unstable, but at least, for this specific version, it allowed me to change the VM settings programmatically.

@docker-robott
Copy link
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

@docker docker locked and limited conversation to collaborators Jun 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants