Skip to content

Commit

Permalink
updated wording
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdentremont committed May 22, 2024
1 parent 82e9955 commit bb14bf4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/installation/docker/site-template/containers.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
# Working in Your Containers

When using Docker, we often have to run commands inside the Docker containers. For example, you can run the same Drush commands you would run in a non-Docker environment, but you must run those commands inside the Drupal container.

## Running Commands in the Containers

Many of the following commands require running inside of your containers. You can get a bash shell inside the container by running
If you want to work inside a container, you can use Docker Compose to run bash from inside the container. You can get a bash shell inside the Drupal container by running

`docker compose exec drupal-dev with-contenv bash`

Or you can run a command from the host machine by running
Or you can run your command from the host machine by running

`docker compose exec -T drupal-dev with-contenv bash -lc 'YOUR COMMAND'`

For example, if you want to run a drush cache rebuild you could run
For example, if you want to perform a Drush cache rebuild you could run

`docker compose exec -T drupal-dev with-contenv bash -lc 'drush cr'`

!!! Note "Container Names"
The container name drupal-dev is the ‘services’ name as set in your docker-compose.yml. To access the drupal container in production you would replace drupal-dev with drupal-prod.

You can also access other containers in this way, by replacing drupal-dev with their service name, like mariadb-dev.
You can also access other containers in this way, by replacing drupal-dev with their service name. For example, mariadb-dev or solr-prod.

For more information see the documentation on [docker compose exec](https://docs.docker.com/reference/cli/docker/compose/exec/)
For more information, see the documentation on [docker compose exec](https://docs.docker.com/reference/cli/docker/compose/exec/)

### Container Variables

In some of the commands throughout the ISLE Site Template documentation you will see references to variables like `${DRUPAL_DEFAULT_SITE_URL}`. These are variables that are provided in the containers by the s6-overlay in [Islandora Buildkit](https://github.com/Islandora-Devops/isle-buildkit).

If you want to see their values you can run
If you want to see their values, you can run

```
docker compose exec -T drupal-dev with-contenv bash -lc 'echo ${DRUPAL_DEFAULT_SITE_URL}'
Expand Down

0 comments on commit bb14bf4

Please sign in to comment.