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: https://confluence.atlassian.com/bitbucket/get-started-with-bitbucket-pipelines-792298921.html and here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html

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: