Login using docker login

Roel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2023

I am having a local docker file created and I want to pusch it to the bitbucket repo. 

When running docker login - u UserNAme -p Password bitbucket.org I am getting the error. Error response from daemon: login attempt to https://bitbucket.org/v2/ failed with status: 404 Not Found

Iam really stuck on how to get mijn local docker image to my bitbucket repo

 

Thanks in advance 

1 answer

1 accepted

1 vote
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 12, 2023

Hello @Roel and welcome to the Community!

Bitbucket Cloud is designed to function as a git repository, facilitating the storing and versioning of your files and code. As such, you can utilize Bitbucket to push your files and code.

However, it appears there might be some confusion regarding the possibility of pushing Docker images as well. Unfortunately, Bitbucket Cloud does not support this function. Docker images require a docker registry for storage, such as Dockerhub.

To utilize Docker Hub or a similar docker registry service, you will need to use the 'docker login' command. This will enable you to log in to your docker registry and subsequently push your Docker images to it.

However, if what you want to push to Bitbucket Cloud is actually the Dockerfile ( and not the docker image itself), then you can follow the below steps :

  1. Create a repository in Bitbucket Cloud (or use an existing one you have)
  2. Clone the repository locally using your system terminal 
    For HTTPS : 
    git clone https://{username}:{app_password}@bitbucket.org/{workspace}/{repository}.git

    For SSH
     git clone git@bitbucket.org:<workspace>/<repository>.git
  3. Add the Dockerfile inside the local clone of the repo
  4. Commit the file using the following git commands :
    git add Dockerfile
    git commit -m "adding a Dockerfile"
  5. Push the changes to Bitbucket Cloud
    git push

This should make the Dockerfile available in your bitbucket repository.

Hope that helps! Let me know in case you have any questions.

Thank you, @Roel !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events