Skip to content

Commit 8dc6683

Browse files
committed
oscontainer-deprecated-legacy-format: use runvm not nested containers
1 parent d9d6655 commit 8dc6683

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/cmd-upload-oscontainer-deprecated-legacy-format

+5-4
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ digestfile = "tmp/oscontainer-digest"
104104
# We need to pass the auth file from the unpriv user to the root process
105105
cosa_argv = ['sudo', '--preserve-env=container,DISABLE_TLS_VERIFICATION,SSL_CERT_DIR,SSL_CERT_FILE,REGISTRY_AUTH_FILE,OSCONTAINER_CERT_DIR']
106106
authfile = os.environ.get("REGISTRY_AUTH_FILE", os.path.expanduser('~/.docker/config.json'))
107-
if not os.path.isfile(authfile):
108-
raise SystemExit(f"Missing {authfile}")
109-
os.environ['REGISTRY_AUTH_FILE'] = authfile
110-
cosa_argv.extend(['/usr/lib/coreos-assembler/oscontainer.py', '--workdir=./tmp', 'build', f"--from={args.from_image}"])
107+
#if not os.path.isfile(authfile):
108+
# raise SystemExit(f"Missing {authfile}")
109+
#os.environ['REGISTRY_AUTH_FILE'] = authfile
110+
print("Entering vm to build oscontainer for build: {}".format(latest_build))
111+
cosa_argv.extend(['/bin/sh', '-c', '. /usr/lib/coreos-assembler/cmdlib.sh; prepare_build && . /usr/lib/coreos-assembler/cmdlib.sh && runvm -- /usr/lib/coreos-assembler/oscontainer-deprecated-legacy-format.py', '--workdir=./tmp', 'build', f"--from={args.from_image}"])
111112
for d in args.add_directory:
112113
cosa_argv.append(f"--add-directory={d}")
113114
cosa_argv.append(f"--display-name={display_name}")

0 commit comments

Comments
 (0)