You can execute code examples and develop your Google Ads API application inside a
Docker container built using the provided [Dockerfile](https://github.com/googleads/google-ads-perl/blob/HEAD/Dockerfile) and
[docker-compose.yml](https://github.com/googleads/google-ads-perl/blob/HEAD/docker-compose.yml).

## Prerequisites

Before starting, [install Docker](https://docs.docker.com/get-docker/) on your machine.

## Start the container

To build and start the Docker container instance in the background, run the
following command in the directory where you cloned the repository:

```bash
docker compose up --build -d
```

This provides a Docker container instance with the execution environment set up.

## Access the container shell

To open a Bash shell inside the running container, run `docker ps` to get the
container ID, then run:

```bash
docker exec -it <CONTAINER_ID> bash
```

Alternatively, if you started the container using Docker Compose, you can run
`docker compose exec` with the service name defined in `docker-compose.yml`
(`web`):

```bash
docker compose exec web bash
```

This lets you run code examples and other scripts inside the interactive
container shell.

## Stop the container

To stop and remove the running container instances, run:

```bash
docker compose down
```