Skip to content

Tips & Tricks

Don Richards edited this page Mar 18, 2022 · 6 revisions

These are tips developers might find useful for developing and debugging within isle-dc.

Log into Drupal's container (like ssh)

docker-compose exec drupal bash

Get Drupal Container's URL

docker inspect -f "{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $(docker ps --format "{{.Names}}" | grep drupal)

Get Solr's Dashboard URL

Get the Solr URL even when EXPOSE_SOLR is set to false in .env file

echo http://$(docker inspect -f "{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}" $(docker ps --format "{{.Names}}" | grep solr)):8983/solr/#/

# Outputs
http://172.21.0.17:8983/solr/#/

Hard Reset

⚠ How to reset Docker clearing everything cached (will will destroy any container, volume, stored image, custom networks, etc) and for this reason it should never be ran on a production server. This removes all residual data from previously built docker containers. This will remove containers you've previously exited as well so everything will be removed. This is helps when testing/troubleshooting the build process but is unlikely to be used by many people unless their having issues on the initial build or need to clear out docker entirely.

[WARNING] Read the entire description before using.

docker kill $(docker ps -q) ; docker rm $(docker ps -a -q) ; docker rmi $(docker images -q) ; docker system prune --volumes -a -f ; docker network prune -f ; docker network create gateway