diff --git a/aci-builder/bin-run/builder.go b/aci-builder/bin-run/builder.go index b7ab7c5f..10306248 100644 --- a/aci-builder/bin-run/builder.go +++ b/aci-builder/bin-run/builder.go @@ -204,7 +204,11 @@ func (b *Builder) runBuild() error { func (b *Builder) prepareNspawnArgsAndEnv(commandPath string) ([]string, []string, error) { var args []string env := os.Environ() + env = append(env, "LD_LIBRARY_PATH="+b.stage1Rootfs+"/dgr/usr/lib") + env = append(env, "LD_PRELOAD="+b.stage1Rootfs+"/dgr/usr/lib/libsystemd-shared-232.so") // debian lib dir hell args = append(args, b.stage1Rootfs+"/dgr/usr/lib/ld-linux-x86-64.so.2") + args = append(args, "--library-path") + args = append(args, b.stage1Rootfs+"/dgr/usr/lib") args = append(args, b.stage1Rootfs+"/dgr/usr/bin/systemd-nspawn") if context := os.Getenv(rktcommon.EnvSELinuxContext); context != "" { args = append(args, fmt.Sprintf("-Z%s", context)) @@ -212,7 +216,6 @@ func (b *Builder) prepareNspawnArgsAndEnv(commandPath string) ([]string, []strin args = append(args, "--register=no") args = append(args, "-q") args = append(args, "--link-journal=auto") - env = append(env, "LD_LIBRARY_PATH="+b.stage1Rootfs+"/dgr/usr/lib") if !logs.IsDebugEnabled() { args = append(args, "--quiet") }