---
title: "Example to build a Docker image with Docker Build Cloud (DBC)"
description: "An example that builds a Dockerfile in Docker Build Cloud."
url: "https://www.pulumi.com/dev/examples/dockerbuildcloud-ts/"
image: "https://www.pulumi.com/assets/og/dev/examples/dockerbuildcloud-ts.png"
---

# Example to build a Docker image with Docker Build Cloud (DBC)

An example that builds a Dockerfile in Docker Build Cloud.

- Source on GitHub: https://github.com/pulumi/examples/tree/master/dockerbuildcloud-ts
- Deploy with Pulumi: https://app.pulumi.com/new?template=https%3A%2F%2Fgithub.com%2Fpulumi%2Fexamples%2Ftree%2Fmaster%2Fdockerbuildcloud-ts

## Get started with this example

This example lives in the [pulumi/examples](https://github.com/pulumi/examples/tree/master/dockerbuildcloud-ts) repo. Pull down just this directory to follow along:

```bash
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examples
git -C pulumi-examples sparse-checkout set dockerbuildcloud-ts
cd pulumi-examples/dockerbuildcloud-ts
```

Builds a Docker Image from an NGINX local Dockerfile. This template prompts the user for an existing DBC builder.

Last revision: May 2024.

## 📋 Pre-requisites

- [Docker Build Cloud (DBC) builder](https://build.docker.com/)
- 🚨 You **must** complete the [DBC builder setup steps](https://docs.docker.com/build/cloud/setup/#steps) 🚨
- Docker Desktop / CLI
- [Pulumi CLI](https://www.pulumi.com/docs/get-started/install/)
- *Recommended* [Pulumi Cloud account](https://app.pulumi.com/signup)
- [npm](https://www.npmjs.com/get-npm)

## 👩‍🏫 Get started

This Pulumi example is written as a template. It is meant to be copied via `pulumi new` as follows:

```bash
$ pulumi new https://github.com/pulumi/examples/tree/master/dockerbuild-ts-dbc
$ npm install
```
Once copied to your machine, feel free to edit as needed.

Alternatively, click the button below to use [Pulumi Deployments](https://www.pulumi.com/docs/pulumi-cloud/deployments/) to deploy this app:


## 🎬 How to run

To deploy your infrastructure, run:

```bash
$ pulumi up
# select 'yes' to confirm the expected changes
# 🎉 Ta-Da!
```

## 🧹 Clean up

To clean up your infrastructure, run:

```bash
$ pulumi destroy
# select 'yes' to confirm the expected changes
```
