We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Users of private docker repositories may need to authenticate in order to pull docker images from their private docker reposistories.
There does not seem to be a way to supply credentials to the call to ::Docker::Image.create:
::Docker::Image.create
523 def pull_image(image) 524 with_retries do 525 ::Docker::Image.create({ 'fromImage' => "#{repo(image)}:#{tag(image)}" }, nil, docker_connection) 526 end 527 end
On line 525 of lib/kitchen/driver/dokken.rb the call to Docker::Image.create suppliesnil to the create method as the creds it is expecting.
lib/kitchen/driver/dokken.rb
Docker::Image.create
nil
create
Here is the code from docker-api:
docker-api
109 # Create a new Image. 110 def create(opts = {}, creds = nil, conn = Docker.connection, &block) 111 credentials = creds.nil? ? Docker.creds : creds.to_json 112 headers = credentials && Docker::Util.build_auth_header(credentials) || {} 113 body = '' 114 conn.post( 115 '/images/create', 116 opts, 117 :headers => headers, 118 :response_block => response_block(body, &block) 119 ) 120 image = opts['fromImage'] || opts[:fromImage] 121 get(image, {}, conn) 122 end
The problem is that both creds and Docker.creds are always nil and this causes the image pull to fail.
creds
Docker.creds
Is there another way to have kitchen-dokken authenticate with a docker repository?
kitchen-dokken
If there is not another way, can the ability to authenticate with private docker repositories be added to kitchen-dokken?
The text was updated successfully, but these errors were encountered:
hello! this would obviously be super useful. I'll take a crack at adding it over the weekend
Sorry, something went wrong.
Thank you @someara for adding this enhancement.
This shipped in 2.17
someara
Successfully merging a pull request may close this issue.
Users of private docker repositories may need to authenticate in order to pull docker images from their private docker reposistories.
There does not seem to be a way to supply credentials to the call to
::Docker::Image.create
:On line 525 of
lib/kitchen/driver/dokken.rb
the call toDocker::Image.create
suppliesnil
to thecreate
method as the creds it is expecting.Here is the code from
docker-api
:The problem is that both
creds
andDocker.creds
are alwaysnil
and this causes the image pull to fail.Is there another way to have
kitchen-dokken
authenticate with a docker repository?If there is not another way, can the ability to authenticate with private docker repositories be added to
kitchen-dokken
?The text was updated successfully, but these errors were encountered: