From 32befa194bc8d53de7e0ca1b526ca7f3db2f8e46 Mon Sep 17 00:00:00 2001 From: Roman Mohr Date: Thu, 15 Nov 2018 16:46:37 +0100 Subject: [PATCH] Don't require a base layer --- rpm/install_rpms.py | 4 ++-- test/BUILD | 6 ++++++ testdata/BUILD | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/rpm/install_rpms.py b/rpm/install_rpms.py index f787899..a5e0e8f 100644 --- a/rpm/install_rpms.py +++ b/rpm/install_rpms.py @@ -9,8 +9,8 @@ parser = argparse.ArgumentParser( description='Install RPMs and update the RPM database inside the docker image') -parser.add_argument('--uncompressed_layer', action='append', required=True, - help='The output file, mandatory') +parser.add_argument('--uncompressed_layer', action='append', required=False, + help='The output file, mandatory', default=[]) parser.add_argument('--rpm', action='append', required=True, help=('rpms to add to the database')) diff --git a/test/BUILD b/test/BUILD index f7d38e9..cc05870 100644 --- a/test/BUILD +++ b/test/BUILD @@ -17,3 +17,9 @@ container_test( configs = ["configs/allinone.yaml"], image = "//testdata:allinone", ) + +container_test( + name = "allinone_no_base_test", + configs = ["configs/allinone.yaml"], + image = "//testdata:allinone_no_base", +) diff --git a/testdata/BUILD b/testdata/BUILD index 251a002..ad993f7 100644 --- a/testdata/BUILD +++ b/testdata/BUILD @@ -22,6 +22,11 @@ rpm_image( rpms = ["@glibc//file", "@ca_certificates//file"], ) +rpm_image( + name = "allinone_no_base", + rpms = ["@glibc//file", "@ca_certificates//file"], +) + rpm_image( name = "image2", base = ":image1",