GNS3 Docker Images
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build_all 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh
  2. #
  3. # build all docker images in this repository
  4. #
  5. set -e
  6. DOCKER_BUILD_OPTIONS="--force-rm"
  7. last_image=$(docker images -q | head -n1)
  8. echo
  9. echo "*** ipterm"
  10. echo
  11. docker build $DOCKER_BUILD_OPTIONS -t ehlers/ipterm-base ipterm/base
  12. docker build $DOCKER_BUILD_OPTIONS -t ehlers/ipterm ipterm/cli
  13. docker build $DOCKER_BUILD_OPTIONS -t ehlers/webterm ipterm/web
  14. docker build $DOCKER_BUILD_OPTIONS -t ehlers/web_java ipterm/java
  15. for dockerfile in */Dockerfile; do
  16. dir=$(dirname "$dockerfile")
  17. tag=$(echo "$dir" | sed 's/\+/\//')
  18. echo
  19. echo "*** $tag"
  20. echo
  21. docker build $DOCKER_BUILD_OPTIONS -t "$tag" "$dir"
  22. done
  23. [ -n "$last_image" ] && filter="--filter since=$last_image" || filter=""
  24. new_images=$(docker images $filter --format '{{.Repository}}:{{.Tag}}' | sort)
  25. dangling=$(docker images -f "dangling=true" -q)
  26. if [ -n "$dangling" ]; then
  27. echo
  28. echo "*** Removing dangling images..."
  29. echo "$dangling" | xargs docker rmi
  30. fi
  31. echo
  32. echo "*** New images:"
  33. if [ -n "$new_images" ]; then
  34. echo "$new_images"
  35. else
  36. echo '--- None ---'
  37. fi