Closed Koumudini-Sambre closed 1 year ago
@Koumudini-Sambre hey! Since testcontainers-ruby
uses the docker-api
gem underneath I think you can use the Docker.authenticate!
command before creating any container (as described here:
# docker command for reference: docker login
Docker.authenticate!('username' => 'docker-fan-boi', 'password' => 'i<3docker', 'email' => 'dockerboy22@aol.com')
# => true
# docker command for reference: docker login registry.gitlab.com
Docker.authenticate!('username' => 'docker-fan-boi', 'password' => 'i<3docker', 'email' => 'dockerboy22@aol.com', 'serveraddress' => 'https://registry.gitlab.com/v1/')
# => true
Can you try it and report your findings here?
Yes this works @guilleiguaran Thanks :)
I want to authenticate docker for pulling image from ecr, to instantiate container of that. Is this functionality provided as as
golang
https://golang.testcontainers.org/features/docker_auth/?