Reputation: 137
I've been trying to push a docker image from a private registry to Swisscom Cloudfoundry. The registry is protected by basic auth since we do not want to provide access to anyone.
Now, using the cf CLI, I would like to push the image to cloudfoundry:
cf push appname -o my-registry.domain.com/image
Logically this will result in an error which states that no authentication credentials are provided.
cf push appname -o username:[email protected]/image
results in an unspecified error during staging.
Is there any way to push an image from a registry which is protected by Basic Auth via CF CLI?
I was not able to find anything in the CF CLI documentation.
Upvotes: 3
Views: 433
Reputation: 1
Cloud Foundry will support pushing apps from images in private Docker repositories pretty soon, the feature has been released as part of Cloud Controller CC 1.28.0. Expect this feature to be released in CF v260, which should be adopted by providers within the next 4 to 6 weeks.
The Command Line Interface (CLI) has a story in their backlog to support adding username/password as parameter and environment variable to cf push
.
Upvotes: 0
Reputation: 1485
cf push
currently (version 6.26.0) does not support private docker registries.
This feature is currently being added to the Cloud Controller. It is not even available yet in the latest CF release (v258) but the API is documented in the CC release candidate documentation: http://apidocs.cloudfoundry.org/release-candidate/apps/creating_a_docker_app.html
You can use cf curl
to call this API until cf push
supports it.
The CLI tracker story to follow is https://www.pivotaltracker.com/story/show/143540893.
Upvotes: 3