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

Client API: name intermediate build containers in ImageBuildOptions #39276

Open
Collinux opened this issue May 28, 2019 · 1 comment
Open

Client API: name intermediate build containers in ImageBuildOptions #39276

Collinux opened this issue May 28, 2019 · 1 comment

Comments

@Collinux
Copy link
Contributor

Collinux commented May 28, 2019

When programmatically building Docker images using the Go API func (*Client) ImageBuild I'm not able to provide a name to the intermediate build containers.

Here's the output of running a docker ps while my build process is running:

CONTAINER ID        IMAGE                                                          COMMAND                  CREATED              STATUS                  PORTS               NAMES
77ee6c72272b        1897882729db                                                   "/bin/sh -c 'ansible…"   3 seconds ago        Up Less than a second                       awesome_curran
1f5f6ed44478        5e03d8edf219                                                   "/bin/sh -c 'ansible…"   3 seconds ago        Up Less than a second                       hungry_hamilton
32adff3442a0        8893b6fdb835                                                   "/bin/sh -c 'ansible…"   5 seconds ago        Up 1 second                                 agitated_proskuriakova
97f43ceeec45        8590635ce181                                                   "/bin/sh -c 'ansible…"   5 seconds ago        Up 1 second                                 lucid_ardinghelli
57b199c0e435        f4609b30deec                                                   "/bin/sh -c 'ansible…"   5 seconds ago        Up 1 second                                 musing_lichterman
85cb6a20e9ac        6a8fa3075c2b                                                   "/bin/sh -c 'ansible…"   5 seconds ago        Up 1 second                                 pensive_ellis
28367227f00a        a4ae753ba2d2                                                   "/bin/sh -c 'ansible…"   5 seconds ago        Up 1 second                                 optimistic_ganguly

Under the "NAMES" column I expect the intermediate build containers to have the same name as the final image but instead it's displaying a randomly generated image name such as hungry_hamilton, optimistic_ganguly, etc.

As a sys admin it would be optimal to see what containers are being built in my environment since I have numerous containers being concurrently built by several processes. Is there an option in the ImageBuildOptions that would set the name of the intermediate build containers? Any way to disable these randomly generated names?

@AkihiroSuda
Copy link
Member

BuildKit-mode hides these containers.
Does that work for you?

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

No branches or pull requests

2 participants