Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika@curoverse.com>
[arvados.git] / tools / arvbox / lib / arvbox / docker / api-setup.sh
index d4ff7c94dd3738c44a838e26eb06a3bc2ef6b5d7..14b4ac29981afaf8fb843b1267efcb3bcd771659 100755 (executable)
@@ -1,4 +1,7 @@
 #!/bin/bash
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
 
 exec 2>&1
 set -ex -o pipefail
@@ -56,6 +59,7 @@ development:
   auto_setup_new_users_with_vm_uuid: $vm_uuid
   auto_setup_new_users_with_repository: true
   default_collection_replication: 1
+  docker_image_formats: ["v1"]
 EOF
 
 (cd config && /usr/local/lib/arvbox/application_yml_override.py)
@@ -78,7 +82,8 @@ if ! test -f /var/lib/arvados/api_database_setup ; then
 fi
 
 if ! test -s /var/lib/arvados/superuser_token ; then
-    bundle exec ./script/create_superuser_token.rb > /var/lib/arvados/superuser_token
+    superuser_tok=$(bundle exec ./script/create_superuser_token.rb)
+    echo "$superuser_tok" > /var/lib/arvados/superuser_token
 fi
 
 rm -rf tmp