How to build docker-ce from source on macOS

血红的双手。 提交于 2019-12-09 19:19:42

问题


Anyone knows if there's a guide to build from source and replace docker binary on Mac with it?

The readme doesn't say so I try some make target but got https://github.com/docker/for-mac/issues/3353

Edited What I was trying to do, to be exact, is to debug docker cli to see why the Auth doesn't work for a single developer in my former company, regardless all factor checked and verified to be correct.


回答1:


To do this, checkout the repo of docker cli (it was confusing at first which part of docker live where). But the cli is at: git@github.com:docker/cli.git

Build it( this build dist for all platform), assuming you have make already: make -f docker.Makefile binary cross

Then either use this binary(this is for Mac), for example: build/docker-darwin-amd64 pull mysql

Or backup and replace your original /usr/local/bin/docker with the binary above.



来源:https://stackoverflow.com/questions/53407108/how-to-build-docker-ce-from-source-on-macos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!