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
document use of containerized buildctl #139
Conversation
README.md
Outdated
@@ -106,6 +106,34 @@ buildctl build ... --exporter=local --exporter-opt output=path/to/output-dir | |||
buildctl du -v | |||
``` | |||
|
|||
#### Running containerized buildkit | |||
|
|||
buildkit daemon supports communicating with clients over TCP which makes it possible, among other things, to run buildkit within _Docker for Mac_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not limited to "for Mac"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
among other things
but I will rephrase it :)
To run daemon in a container: | ||
|
||
``` | ||
$ docker run --rm --privileged -p 12345:12345 --tmpfs /tmp buildkit:buildd-standalone buildd-standalone --addr tcp://0.0.0.0:12345 --root /tmp/buildkit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vdemeester @tonistiigi Please suggest (tentative) TCP port?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AkihiroSuda ahah I'm bad with numbers and names 😛 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We haven't requested a fixed one (and probably shouldn't) so some incremental numbers or some round number sgtm for now.
README.md
Outdated
Notes: | ||
|
||
* `--privileged` is needed for buildkit to access docker engine | ||
* `--tmpfs` is mandatory to provide support for [overlayfs](https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to make sure the --root directory exists on a filesystem that is supported by overlay filesystem. e.g. tmpfs, ext4, xfs.
README.md
Outdated
Run build script: | ||
|
||
``` | ||
$ ./buildkit0 | ./bin/buildctl-darwin --addr tcp://localhost:12345 build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./bin/buildctl
for Linux, ./bin/buildctl-darwin
for macOS, ./bin/buildctl.exe
for Windows
Also, please sign commit? ( @thaJeztah can/should we set up DCO bot? |
README.md
Outdated
|
||
Notes: | ||
|
||
* `--privileged` is needed for buildkit to access docker engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildkit
doesn't access docker engine. --privileged
is needed to grant permissions for assigning namespaces and allow mounting snapshots.
README.md
Outdated
|
||
buildkit daemon supports communicating with clients over TCP. This is supports some use cases like: | ||
|
||
* Docker for Mac or Windows users which cannot run natively buildkit daemon on their platform, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add "yet", as we definitely want to support running buildd
on windows in the future.
@AkihiroSuda @abailly Should we push a version to the hub as well to simplify testing? |
SGTM 👍 |
opened #142 for discussing hub repo |
Signed-off-by: Arnaud Bailly <arnaud.oqube@gmail.com>
LGTM |
fix #132