# Accessing Docker containers

Since V2 Create Magento App consists of a PHP Docker container that runs Magento and additional containers with Varnish, Redis, Elasticsearch, Nginx, and MariaDB, and CLI to connect all of these things together. We already have a [CLI](https://docs.create-magento-app.com/getting-started/available-commands/cli) command that gives us access to [Magento CLI](https://experienceleague.adobe.com/docs/commerce-operations/reference/magento-open-source.html) and [Composer CLI](https://getcomposer.org/doc/03-cli.md), but how can we access the containers?\
That is where the connect command comes in handy!

```bash
yarn run exec <service name> # for Yarn
npm run exec <service name> # for NPM
```

Now we are inside of a chosen container.\
Here is a list of available service names:

* `mariadb`
* `nginx`
* `ssl-terminator (nginx)`
* `redis`
* `elasticsearch`
* `php`
* `phpWithXdebug`
* `varnish`

{% hint style="info" %}
If you are using OpenSearch, the service name `elasticsearch` will remain the same.
{% endhint %}

## Common Usage

```bash
yarn run exec mariadb

>root@c8f223c3ea92:/# # inside a mariadb container

# ctrl + d or type 'exit' and press enter

# this is not an alias, but rather service name matching
yarn run exec ma

>root@c8f223c3ea92:/# # inside a mariadb container

```
