Hello everyone,
I am trying to create an automated docker image build using pipelines, but i keep running into the same error:
+ docker version
bash: docker: command not found
----------------------------------------
i also get the following error when i try something else:
*---------------------------------------
I'm guessing docker is either not available in bitbucket, or i have something that's off in my bitbucket-pipelines.yml
Hi @Serge Asmar
Looks like you are missing the service definition.
Have a look here: https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/
Hello @Serge Asmar ,
Just adding to @Erez Maadani 's comment, in the first pipeline screenshot I'm seeing the error :
The push refers to repository [docker.io/library/first_pipeline_img_build]
[...]
denied: requested access to the resource is denied
This is because when you built the docker image with docker build you provided the tag (-t) with just the image name but not the docker hub namespace where you want to push this image to. This makes docker default to library namespace, and your docker hub account doesn't seem to have access to that namespace/account.
In this case, I would recommend updating your docker build command to include the namespace/account into the tag, like the following example :
docker build -t mydockerhubuser/first_pipeline_img_build .
In the above example, we are using the docker hub account mydockerhubuser. This is the account under which the image will be pushed when you run a docker push.
Thank you, @Serge Asmar !
Patrik S!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome thanks guys!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.