Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions bib/cmd/bootc-image-builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"io/fs"
"log"
"os"
"os/exec"
"path/filepath"
"runtime/debug"
"strconv"
Expand Down Expand Up @@ -47,16 +46,6 @@ var (
osStderr = os.Stderr
)

func inContainerOrUnknown() bool {
// no systemd-detect-virt, err on the side of container
if _, err := exec.LookPath("systemd-detect-virt"); err != nil {
return true
}
// exit code "0" means the container is detected
err := exec.Command("systemd-detect-virt", "-c", "-q").Run()
return err == nil
}

func saveManifest(ms manifest.OSBuildManifest, fpath string) (err error) {
b, err := json.MarshalIndent(ms, "", " ")
if err != nil {
Expand Down Expand Up @@ -278,7 +267,7 @@ func cmdBuild(cmd *cobra.Command, args []string) error {
return fmt.Errorf("cannot validate the setup: %w", err)
}
logrus.Debug("Ensuring environment setup")
switch inContainerOrUnknown() {
switch setup.IsContainer() {
case false:
fmt.Fprintf(os.Stderr, "WARNING: running outside a container, this is an unsupported configuration\n")
case true:
Expand Down
2 changes: 1 addition & 1 deletion bib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/cheggaaa/pb/v3 v3.1.7
github.com/hashicorp/go-version v1.7.0
github.com/osbuild/blueprint v1.16.0
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521
github.com/osbuild/image-builder-cli v0.0.0-20251105211730-5fddcab334fe
github.com/osbuild/images v0.211.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.10.1
Expand Down
4 changes: 2 additions & 2 deletions bib/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ github.com/opencontainers/selinux v1.12.0 h1:6n5JV4Cf+4y0KNXW48TLj5DwfXpvWlxXplU
github.com/opencontainers/selinux v1.12.0/go.mod h1:BTPX+bjVbWGXw7ZZWUbdENt8w0htPSrlgOOysQaU62U=
github.com/osbuild/blueprint v1.16.0 h1:f/kHih+xpeJ1v7wtIfzdHPZTsiXsqKeDQ1+rrue6298=
github.com/osbuild/blueprint v1.16.0/go.mod h1:HPlJzkEl7q5g8hzaGksUk7ifFAy9QFw9LmzhuFOAVm4=
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521 h1:Mo1htXYyEoKrBQD+/RC/kluAWu4+E0oEjPorujVn/K8=
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521/go.mod h1:oTn9T+bV9g/760hM/jX7AV0c4vuVIn6FjAnaVM9RzRo=
github.com/osbuild/image-builder-cli v0.0.0-20251105211730-5fddcab334fe h1:QkM7cmMeLQK0KgP5nASxz4nF1E2Fq/KM7lGX9Pdr4tM=
github.com/osbuild/image-builder-cli v0.0.0-20251105211730-5fddcab334fe/go.mod h1:IkrRthNZtHV7wbPtvLIv+BY+9jyTZL8EpI2nzCX5nv4=
github.com/osbuild/images v0.211.0 h1:3BU7mMM7Iu81qZnq7y8luuIIOt707J9tF9DwCyOk9yM=
github.com/osbuild/images v0.211.0/go.mod h1:Cs7zFV8rmbVHn+19ArNdjd1AtFk+LC9dOOHuxiSLghw=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down
Loading