build-all-dockers 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash
  2. # Use this script to build the five docker images: one for PRAC (our
  3. # work), and one each for Duoram, Floram, 3P Circuit ORAM, and Ramen
  4. # (the four systems we compare against). We made the dockerization
  5. # scripts for these latter systems as well.
  6. # cd into the directory containing this script (from the bash faq 028)
  7. if [[ $BASH_SOURCE = */* ]]; then
  8. cd -- "${BASH_SOURCE%/*}/" || exit
  9. fi
  10. mkdir -p comps
  11. # Clone the given repo or update it
  12. # Args: repo_url dirname branch_or_tag
  13. clone_or_update() {
  14. repourl="$1"
  15. repodir="$2"
  16. tag="$3"
  17. if [ -d comps/${repodir}/.git ]; then
  18. ( cd comps/${repodir} && git fetch --tags -f origin && git checkout $tag ) || exit 1
  19. else
  20. ( cd comps && git clone ${repourl} ${repodir} && cd ${repodir} && git checkout $tag ) || exit 1
  21. fi
  22. }
  23. # See if we need to clone those other four repos
  24. clone_or_update \
  25. https://git-crysp.uwaterloo.ca/avadapal/floram-repro-prac \
  26. floram master
  27. clone_or_update \
  28. https://git-crysp.uwaterloo.ca/avadapal/3p-circuit-oram-prac-repro \
  29. circuit-oram master
  30. clone_or_update \
  31. https://git-crysp.uwaterloo.ca/avadapal/ramen-dockerization \
  32. ramen master
  33. clone_or_update \
  34. https://git-crysp.uwaterloo.ca/iang/duoram-prac-repro \
  35. duoram prac_repro
  36. # Stop any existing dockers
  37. ./stop-all-dockers
  38. # Build the five docker images
  39. echo "Building PRAC docker..."
  40. echo
  41. ( cd ../docker && ./build-docker ) || exit 1
  42. echo
  43. echo "Building Duoram docker..."
  44. echo
  45. ( cd comps/duoram/Docker && ./build-docker ) || exit 1
  46. echo
  47. echo "Building Floram docker..."
  48. echo
  49. ( cd comps/floram && ./build-docker ) || exit 1
  50. echo
  51. echo "Building Circuit ORAM docker..."
  52. echo
  53. ( cd comps/circuit-oram/docker && ./build-docker ) || exit 1
  54. echo
  55. echo "Building Ramen docker..."
  56. echo
  57. ( cd comps/ramen/Docker && ./build-docker ) || exit 1
  58. echo
  59. echo "Done."