Why does `docker-login` fail in BitBucket pipelines?
At the moment the docker login and docker push commands are only available to Pipelines Alpha members.

You can read about the features available to Alpha at "Pipelines Alpha".

In order to participate, the above link includes instructions on how you can opt-in to the added functionality.

Personally I received an e-mail from Atlassian a day after signing up saying my projects now include Alpha features. So this feature works in my pipelines without any issues.