Sign inSign up

hostpapadev/php73dev

By hostpapadev

•Updated over 6 years ago

Image
0

3.1K

hostpapadev/php73dev repository overview

⁠Docker Image base of PHP 7.3

This repository holds the DockerFile config use to create our Docker image for BitBucket Pipeline.

⁠Local Installation

TODO: Add overall DB, nginx, and other setup info from the Google Doc⁠

  1. Clone this repository to your local machine from version control
    • git clone {repository url}
  2. Edit the DockerFile

⁠Deploying

  1. Push the change to Docker Hub
  2. Update Pipeline to the new USER/NAME image

⁠How To

⁠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. Edit 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:

$ docker build -t yourdockerusername/imagename .

⁠5. Push image to Docker hub

Run command

$ docker push yourdockerusername/imagename

⁠6. 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.

image: yourdockerusername/imagename
pipelines:
  default:
    - step:
        script:
          - echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
  branches:
    master:
      - step:
          script:
            - echo "This script runs only on commit to the master branch."
    feature/*:
      - step:
          image: yourdockerusername/imagename # This step uses its own image
          script:
            - echo "This script runs only on commit to branches with names that match the feature/* pattern."

Credit to this answer on atlassian.com

https://community.atlassian.com/t5/Bitbucket-questions/How-do-I-create-a-docker-image-for-Bitbucket-Pipelines/qaq-p/334724⁠

Tag summary

Content type

Image

Digest

Size

204.5 MB

Last updated

over 6 years ago

docker pull hostpapadev/php73dev