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-php/blob/HEAD/Dockerfile) and
[docker-compose.yml](https://github.com/googleads/google-ads-php/blob/HEAD/docker-compose.yml).

## Prerequisites

1. [Install Docker](https://docs.docker.com/get-docker/) on your machine.
2. Configure your `google_ads_php.ini` file as described in the [Configuration guide](https://developers.google.com/google-ads/api/docs/client-libs/php/configuration).

## Start the container

To build and start the Docker container in the background, run the following
command in the root directory of your cloned repository:

    docker compose up --build -d

This provides a Docker container instance with all required dependencies
installed.

## Access the container shell

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

    docker exec -it <CONTAINER_ID> bash

Alternatively, you can use Docker Compose with the service name defined in
`docker-compose.yml` (`web`):

    docker compose exec web bash

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

## Stop the container

To stop and remove the running container instances, run:

    docker compose down