build-aci.sh 546 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. if [ $# -ne 1 ]; then
  4. echo "Usage: $0 tag" >/dev/stderr
  5. exit 1
  6. fi
  7. tag=$1
  8. tgt=$(mktemp -d)
  9. ./build-docker.sh $tag
  10. docker save -o ${tgt}/flannel-${tag}.docker quay.io/coreos/flannel:${tag}
  11. docker2aci ${tgt}/flannel-${tag}.docker
  12. VOL1=run-flannel,path=/run/flannel,readOnly=false
  13. VOL2=etc-ssl-etcd,path=/etc/ssl/etcd,readOnly=true
  14. VOL3=dev-net,path=/dev/net,readOnly=false
  15. actool patch-manifest --replace --capability=CAP_NET_ADMIN --mounts=${VOL1}:${VOL2}:${VOL3} quay.io-coreos-flannel-${tag}.aci
  16. # Cleanup
  17. rm -rf $tgt