Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Commit

Permalink
syscontainers: runtime.json is not used anymore
Browse files Browse the repository at this point in the history
some older versions of the OCI specs had two files, but now there is
only config.json.

More details here:

opencontainers/runc#528

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #513
Approved by: cgwalters
  • Loading branch information
giuseppe authored and rh-atomic-bot committed Aug 4, 2016
1 parent 1d987bf commit 247a175
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Atomic/syscontainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,16 @@ def _write_template(inputfilename, data, values, outfile):

outfile.write(result)

for i in ["config.json", "runtime.json"]:
src = os.path.join(exports, i)
if os.path.exists(src):
shutil.copyfile(src, os.path.join(destination, i))
elif os.path.exists(src + ".template"):
with open(src + ".template", 'r') as infile, open(os.path.join(destination, i), "w") as outfile:
_write_template(src + ".template", infile.read(), values, outfile)
else:
args = ['runc', 'spec']
util.subp(args, cwd=destination)
src = os.path.join(exports, "config.json")
destination_path = os.path.join(destination, "config.json")
if os.path.exists(src):
shutil.copyfile(src, destination_path)
elif os.path.exists(src + ".template"):
with open(src + ".template", 'r') as infile, open(destination_path, "w") as outfile:
_write_template(src + ".template", infile.read(), values, outfile)
else:
args = ['runc', 'spec']
util.subp(args, cwd=destination)

image_manifest = self._image_manifest(repo, rev)
image_id = rev
Expand Down

0 comments on commit 247a175

Please sign in to comment.