One common use case for Pipelines is to automatically build a Docker image for your code and push that image to a container registry whenever you git push your code to Bitbucket. This article assumes you are at least minimally familiar with the structure of Bitbucket Pipelines files. If not, you can see the official documentation here: and here:

Imagine you have an extremely simple Node.js app. In your top-level git directory, you will need two files: a Dockerfile and a bitbucket-pipelines.yml. Your directory structure might look like this: