Run command in another running container in machine

I have a range of containers that are running my application like my webserver container, mysql, container, memcached container and so on. I have a script that run my API tests (e.g ./api-test.sh), but to work it has to be executed into my webserver container because it depends on database and other configs in the whole stack.

There’s a way to pipeline run this command (./api-test.sh) in my another container running in the same machine that drone server is running?

The two main containers in my docker-compose.yml:

version: '3'
services:
    webserver:
        image: container_webserver
        ports:
            - "${CPF_WEBSERVER_PORT}:80"
        volumes:
            - /tmp:/tmp
            - /etc/hosts:/etc/hosts
            - ${APP_PATH}:/var/www/html/app
        environment:
            - CPF_CANNON_TOKEN={SAMPLE}
        links:
            - mysql
        entrypoint: "sample"
    mysql:
        image: mysql:5.7.22
        ports:
            - "${CPF_DATABASE_MAIN_PORT}:3306"

any reason you are not using service containers in your pipeline configuration? this would be the approach that we recommend.
https://docs.drone.io/user-guide/pipeline/services/
https://docs.drone.io/examples/service/