diff --git a/slackerbot/internal/local/local.go b/slackerbot/internal/local/local.go index 1295d31..5dc24d4 100644 --- a/slackerbot/internal/local/local.go +++ b/slackerbot/internal/local/local.go @@ -162,8 +162,11 @@ func (l *Local) Start(ctx context.Context, spec node.StartSpec) error { if err := os.RemoveAll(root); err != nil { return fmt.Errorf("clearing old container files: %w", err) } - if err := os.MkdirAll(filepath.Join(root, "etc"), 0o755); err != nil { - return err + // systemd-nspawn refuses a directory without /usr as not an OS tree. + for _, dir := range []string{"etc", "usr"} { + if err := os.MkdirAll(filepath.Join(root, dir), 0o755); err != nil { + return err + } } if f, err := os.OpenFile(filepath.Join(root, "etc/os-release"), os.O_CREATE, 0o644); err == nil { f.Close()