build-all-dockers 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. # Use this script to build the three docker images: one for Duoram (our
  3. # work), and one each for Floram and 3P Circuit ORAM (the two systems we
  4. # compare against). We made the dockerization scripts for these latter
  5. # two systems as well.
  6. # Pass as an argument the git tag or branch to use. Defaults to
  7. # "usenixsec23_artifact".
  8. tag=usenixsec23_artifact
  9. if [ "$1" != "" ]; then
  10. tag="$1"
  11. fi
  12. # cd into the directory containing this script (from the bash faq 028)
  13. if [[ $BASH_SOURCE = */* ]]; then
  14. cd -- "${BASH_SOURCE%/*}/" || exit
  15. fi
  16. # See if we need to clone those other two repos
  17. if [ -d floram-docker/.git ]; then
  18. ( cd floram-docker && git fetch --tags -f origin && git checkout $tag ) || exit 1
  19. else
  20. ( git clone https://git-crysp.uwaterloo.ca/iang/floram-docker && cd floram-docker && git checkout $tag ) || exit 1
  21. fi
  22. if [ -d circuit-oram-docker/.git ]; then
  23. ( cd circuit-oram-docker && git fetch --tags -f origin && git checkout $tag ) || exit 1
  24. else
  25. ( git clone https://git-crysp.uwaterloo.ca/iang/circuit-oram-docker && cd circuit-oram-docker && git checkout $tag ) || exit 1
  26. fi
  27. # Stop any existing dockers
  28. ./stop-all-dockers
  29. # Build the three docker images
  30. echo "Building Duoram docker..."
  31. echo
  32. ( cd ../Docker && ./build-docker ) || exit 1
  33. echo
  34. echo "Building Floram docker..."
  35. echo
  36. ( cd floram-docker && ./build-docker ) || exit 1
  37. echo
  38. echo "Building Circuit ORAM docker..."
  39. echo
  40. ( cd circuit-oram-docker/docker && ./build-docker ) || exit 1
  41. echo
  42. echo "Done."