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

document use of containerized buildctl #139

Merged
merged 1 commit into from Oct 13, 2017
Merged

Conversation

abailly
Copy link
Contributor

@abailly abailly commented Oct 12, 2017

fix #132

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_.
Copy link
Member

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"

Copy link
Contributor Author

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
Copy link
Member

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?

Copy link
Member

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 😛 😅

Copy link
Member

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/)
Copy link
Member

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
Copy link
Member

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

@AkihiroSuda
Copy link
Member

Also, please sign commit? (git commit -a -s --amend)

@thaJeztah can/should we set up DCO bot?

README.md Outdated

Notes:

* `--privileged` is needed for buildkit to access docker engine
Copy link
Member

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,
Copy link
Member

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.

@tonistiigi
Copy link
Member

@AkihiroSuda @abailly Should we push a version to the hub as well to simplify testing?

@AkihiroSuda
Copy link
Member

@AkihiroSuda @abailly Should we push a version to the hub as well to simplify testing?

SGTM 👍

@AkihiroSuda AkihiroSuda mentioned this pull request Oct 12, 2017
@AkihiroSuda
Copy link
Member

opened #142 for discussing hub repo

Signed-off-by: Arnaud Bailly <arnaud.oqube@gmail.com>
@tonistiigi
Copy link
Member

LGTM

@tonistiigi tonistiigi merged commit 35e433c into moby:master Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

documentation for containerizing buildkit (WAS: Running buildd from Mac OS)
4 participants