Docker commands that are useful to installing or updating ISLE.
docker ps
# Show all running containersdocker ps -a
# Show all running and stopped containers
docker volume ls
# List all volumes
docker-compose start
# Starts existing containers for a servicedocker start $(docker ps -a -q)
# Start all running and stopped containers
docker-compose stop
# Stops running containers without removing themdocker stop [CONTAINER_NAME(S)]
# Stop one or more named containers- Example:
docker stop isle-tomcat isle-solr
- Example:
docker stop $(docker ps -a -q)
# WARNING! This will stop ALL containers running on the machine.
docker-compose down
# Stops containers and removes containers and networks for services defined in the Compose file
docker-compose pull
# Pull down all images from Docker Hubdocker pull [GROUP]/[REPOSITORY]
# Pull one specific image from Docker Hub- Example:
docker pull islandoracollabgroup/isle-fedora:latest
- Example:
docker-compose up -d
# Launch all containers for this service
docker volume rm [VOLUME_NAME]
# Remove one or more volumes. You cannot remove a volume that is in use by a container.- Example:
docker volume rm isle_fed-data
- Example:
docker rm [CONTAINER_NAME(S)]
# Remove one or more containers- Example:
docker rm isle_fed-data
- Example:
docker exec -it [CONTAINER_NAME] bash
# Shell Into Docker Container- Example:
docker exec -it isle-apache-ld bash
- Example:
docker exec -it [CONTAINER_NAME] [FILE_NAME]
# Shell Into Docker Container and Run Script- Example:
docker exec -it isle-apache-ld bash -c "cd /utility-scripts/isle_drupal_build_tools && ./isle_islandora_installer.sh
- Example:
sudo service docker status
# Show Docker Statussudo /bin/systemctl restart docker.service
# Restart Docker Servicesudo service docker restart
# Restart Docker Service (alternate)
docker logs -f --tail 10 [CONTAINER_NAME]
# Show the last 10 lines (--tail 10
) of a container's logs;-f
means continuous/live feed- Example:
docker logs -f --tail 10 isle-apache-ld
- Example:
docker volume inspect [VOLUME_NAME]
# Locate Docker Volume- Example:
docker volume inspect isle_fed-data
- resultant display is a JSON array that contains a location like this:
"Mountpoint": "/var/lib/docker/volumes/isle_fed-data/_data"
- Example:
docker port [CONTAINER_NAME]
# List port mappings or a specific mapping for the containerdocker ps | grep 8381
# Query what is using a specific port numberlsof -i :8381
# Query what is using a specific port number
docker version
# This will render all version information in an easy to read layout
docker-compose down -v
# WARNING! NEVER run this command in production. ONLY consider doing this on your Demo Local machine. This command will delete all Docker containers, networks, volumes, and images created byup
. (This command will not delete your git repository or the paths or contents of your bind mounts.)
docker system prune --all
# WARNING! Remove all unused containers, networks, images and volumes. (Translation: This will remove all stopped containers, all networks not used by a container, all images that lack an associated container, and all build cache.)
docker rm $(docker ps -a -q)
# WARNING! This will remove ALL containers on the machine!
- usage:
cat [FILE_NAME]
- Example:
cat /etc/hosts
- usage:
ping [DOMAIN]
- Example:
ping www.google.com
- Example:
ping isle.localdomain
- usage:
dig [DOMAIN]
- Example:
dig www.google.com
- Example:
dig isle.localdomain
- usage:
sudo rm -rf [DIRECTORY_NAME]
- Example:
sudo rm -rf /var/tmp/scrap/
- Stop all current containers
docker-compose stop
- WARNING! This will remove: all stopped containers;, etc.
docker system prune --all
- Delete "data" folder in ISLE-Developer folder so logs are fresh and clean
sudo rm -rf data
- Pull down the images from Docker Hub
docker-compose pull
- Launch all containers (creates volumes and starts containers)
docker-compose up -d
docker ps -a
Let's Say You Discover You Have Two Older Containers (named isle-web
, isle-db
) and You Want to Remove Them:
- Example to stop these 2 containers
docker stop isle-web isle-db
- Example to remove these 2 containers
docker rm isle-web isle-db