Method: Docker.authenticate!
- Defined in:
- lib/docker.rb
.authenticate!(options = {}, connection = self.connection) ⇒ Object
Login to the Docker registry.
133 134 135 136 137 138 139 140 |
# File 'lib/docker.rb', line 133 def authenticate!( = {}, connection = self.connection) creds = MultiJson.dump() connection.post('/auth', {}, body: creds) @creds = creds true rescue Docker::Error::ServerError, Docker::Error:: raise Docker::Error::AuthenticationError end |