Skip to content

Require docker login when push=true #137

@benfortuna

Description

@benfortuna

It appears you need to run docker login prior to pushing to hub.docker.com.

Would it be possible to integrate this in the plugin? Currently push will fail with following error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildDocker'.
> Docker execution failed
  Command line [docker push image/example:1.0] returned:
  denied: requested access to the resource is denied

Task configuration is like this:

docker {
    baseImage "image/base:1"
}

task buildDocker(type: Docker) {
    applicationName = 'image/example'
    tagVersion = '1.0'
    push true
    apiUsername = username
    apiPassword = password
    apiEmail = [email protected]
}

I haven't tried with useApi=true as yet as that was giving a different error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions