3
2
1
    CommentAdd your comment...

    3 answers

    1.  
      3
      2
      1

      Using this as an example repository: https://github.com/mark-adams/docker-chromium-xvfb, there are some steps required to create your own docker image.

      1. Have a Docker hub account, https://hub.docker.com/
      2. Install docker
      3. Create a Dockerfile
      4. Build the image from Dockerfile
      5. Push the image to Docker hub
      6. Specify the image in your bitbucket-pipelines.yml file

      1 Docker hub account

      Well, sign up here =) https://hub.docker.com/

      2 Install docker

      One way is to use Docker toolbox: https://www.docker.com/products/docker-toolbox

      3 Create Dockerfile

      Example file here: https://github.com/mark-adams/docker-chromium-xvfb/blob/master/images/base/Dockerfile

      4 Build docker image

      In the same directory as you have your Dockerfile, run command:

      5 Push image to Docker hub

      Run command

      Specify the image in your bitbucket-pipelines.yml file

      As documented here: https://confluence.atlassian.com/display/BITBUCKET/Use+Docker+images+as+build+environments+in+Bitbucket+Pipelines

      You can use your image on a top level as well as on a specific step like this. 

      Enjoy Bitbucket Pipelines!

       

      1. Roman Telezhynskyi

        You forget to add one obvious thing for those who know Docker. If you want to build image you should use 64 bit system. 

      2. Igor Ganapolsky

        I cannot push.  I get an error: 

        > An image does not exist locally with the tag

         

        even though I built it.

      CommentAdd your comment...
    2.  
      1
      0
      -1

      Fighting with same issue, just can not understand what is wrong and where

      I did managed to build and publish following docker image:

      Idea behind it is to not install node dependencies each time

      But after trying to use my image i got "sh: 1: webpack: not found"

      I can run it locally like so: docker run --rm -v %cd%/dist:/code/dist foo/bar npm run dist -s

      and all works as expected, hope somebody can clarify what is happening

        CommentAdd your comment...