v1

latestOpenAPI 3.0.0(C) Copyright IBM Corp. 2016 All Rights Reserved.2026-07-144737155.4 KB
Images

Build a Docker image from a Dockerfile

This API builds a new container image from a Dockerfile that is stored on your local machine and pushes the image to the private Bluemix registry (corresponding IBM Containers command: cf ic build).

To push an image to your Bluemix registry, a namespace must be set for the organization. Run cf ic namespace get or call the GET /registry/namespaces API to check if a namespace is already set. If not, run cf ic namespace set NAMESPACE or call the PUT /registry/namespaces/{namespace} API to set a namespace for your organization.

post/build

Query parameters

tstring required

Tag the image with the full path to your private Bluemix registry in the following format: t=registry.ng.bluemix.net/<namespace>/<image_name>:<tag>. This path is used to push the image to the private Bluemix registry after it is built.

qboolean

You can choose whether or not to show the verbose build output to review every step during the container image build. If you set the query parameter to q=false, q=False, or q=0, the verbose build output is suppressed. To show the verbose build output, enter q=true, q=True, or q=1.

nocacheboolean

If you set the query parameter to nocache=true, nocache=True, or nocache=1, the cache will not be used to build your image. To use the cache, enter nocache=false, nocache=False, or nocache=0.

pullboolean

If set to pull=true, pull=True, or pull=1, then a newer version of the image is always attempted to be pulled even though an older version of the image exists locally. If set to pull=false, pull=False, or pull=0, then the local image will be used if one exists.

Headers

X-Auth-Tokenstring required

The Bluemix JSON web token that you receive when logging into Bluemix. Run cf oauth-token to retrieve your access token.

X-Auth-Project-Idstring required

The unique ID of your organization space where you want to create or work with your containers. Run cf space <space_name> --guid, where <space_name> is the name of your space, to retrieve your space ID.

Response

OK. The container image was built successfully and pushed to your private Bluemix repository. The build output stream is returned in JSON format.

All 47 operations