diff --git a/Containerfile b/Containerfile index 09907746..9490b1f4 100644 --- a/Containerfile +++ b/Containerfile @@ -20,6 +20,7 @@ COPY entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] VOLUME /output +WORKDIR /output VOLUME /store VOLUME /rpmmd diff --git a/bib/cmd/bootc-image-builder/main.go b/bib/cmd/bootc-image-builder/main.go index 5e9ed2d4..3acabd74 100644 --- a/bib/cmd/bootc-image-builder/main.go +++ b/bib/cmd/bootc-image-builder/main.go @@ -335,7 +335,7 @@ func run() error { SilenceUsage: true, } rootCmd.AddCommand(manifestCmd) - manifestCmd.Flags().String("rpmmd", "/var/cache/osbuild/rpmmd", "rpm metadata cache directory") + manifestCmd.Flags().String("rpmmd", "/rpmmd", "rpm metadata cache directory") manifestCmd.Flags().String("config", "", "build config file") manifestCmd.Flags().String("type", "qcow2", "image type to build [qcow2, ami]") manifestCmd.Flags().Bool("tls-verify", true, "require HTTPS and verify certificates when contacting registries") @@ -344,7 +344,7 @@ func run() error { logrus.SetLevel(logrus.ErrorLevel) buildCmd.Flags().AddFlagSet(manifestCmd.Flags()) buildCmd.Flags().String("output", ".", "artifact output directory") - buildCmd.Flags().String("store", ".osbuild", "osbuild store for intermediate pipeline trees") + buildCmd.Flags().String("store", "/store", "osbuild store for intermediate pipeline trees") buildCmd.Flags().String("aws-region", "", "target region for AWS uploads (only for type=ami)") buildCmd.Flags().String("aws-bucket", "", "target S3 bucket name for intermediate storage when creating AMI (only for type=ami)") buildCmd.Flags().String("aws-ami-name", "", "name for the AMI in AWS (only for type=ami)") diff --git a/devel/Containerfile b/devel/Containerfile index 257e0142..c1f90969 100644 --- a/devel/Containerfile +++ b/devel/Containerfile @@ -31,5 +31,6 @@ COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] VOLUME /output +WORKDIR /output VOLUME /store VOLUME /rpmmd diff --git a/entrypoint.sh b/entrypoint.sh index 3930a16a..a2d9290c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,3 +1,5 @@ #!/bin/bash set -euo pipefail -/usr/bin/bootc-image-builder build --store /store --rpmmd /rpmmd --output /output "$@" +# TODO: This script only exists for legacy reasons, the plan is to start requiring +# a e.g. `build-image` entrypoint. +/usr/bin/bootc-image-builder build "$@"