Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Building a Dockerfile using Bitbucket pipeline

Michael Schnupp November 20, 2016

I have a project on Bitbucket, which contains a Dockerfile used to build the project.

After each push I want Bitbucket to build that Dockerfile (and send me an Email in case of errors).

 

The pipeline should be able to do so, but I'm not sure hot to set it up correctly for building Dockerfiles.

I tried the following: 

image: docker

pipelines:
  default:
    - step:
        script:
          - docker build .

However this will not work, because the docker image does not include bash. Even if I add bash to the image it will complain because no docker server process is running.

Another solution would be telling dockerhub to pull that repository, but I don't want to publish the result, yet.

 

So is there a way to build the project simply using the Bitbucket pipeline feature?

1 answer

1 accepted

2 votes
Answer accepted
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 20, 2016

'Running or building Docker images from your scripts' is not supported yet (see Limitations of Bitbucket Pipelines) - please watch and vote for the following issue to guide Atlassian's roadmap in this regard:

 

davina
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2017

This is now resolved! You can view the official docs here.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events