Skip to content

Silverblue toolbox script broke because rootless 'podman create' insists on having a command specified #1452

Description

@debarshiray

/kind bug

Description

Here is the toolbox script that we have been working on for Fedora Silverblue.

If you follow the README.md until the fedora-toolbox create step, then you'll see that the podman create ... command fails:

$ ./fedora-toolbox --verbose create
...
...
No command specified on command line or as CMD or ENTRYPOINT in this image
./fedora-toolbox: failed to create container fedora-toolbox-rishi:28

This started happening somewhere between podman-0.8.5 and podman-0.9.1.

Changing the script like this solves the problem:

From 79ac919f63f90b4cf2b425d2e3221d86c44ccb7c Mon Sep 17 00:00:00 2001
From: Debarshi Ray <rishi@fedoraproject.org>
Date: Wed, 12 Sep 2018 14:57:38 +0200
Subject: [PATCH] Make it work with newer podman

'podman create ...' now requires a command.
---
 fedora-toolbox | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fedora-toolbox b/fedora-toolbox
index a918ed484cdc..5861c615d70e 100755
--- a/fedora-toolbox
+++ b/fedora-toolbox
@@ -97,7 +97,8 @@ create()
                  --tty \
                  --volume $HOME:$HOME \
                  --volume $XDG_RUNTIME_DIR:$XDG_RUNTIME_DIR \
-                 $toolbox_image >/dev/null 2>&42; then
+                 $toolbox_image \
+                 /bin/sh --l >/dev/null 2>&42; then
         echo "$0: failed to create container $toolbox_container"
         exit 1
     fi
-- 
2.17.1

Is this a podman regression? Or is this a bug in the toolbox script that was somehow getting papered over in previous podman versions, and should be fixed in the script?

Output of podman version:

Version:       0.9.1
Go Version:    go1.10.4
OS/Arch:       linux/amd64

Output of podman info:

host:
  Conmon:
    package: podman-0.9.1-3.gitaba58d1.fc28.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 1.12.0-dev, commit: 1d75f1d54e9e123a97e7f505e38df7ab7192cfa7-dirty'
  MemFree: 10339491840
  MemTotal: 16696360960
  OCIRuntime:
    package: runc-1.0.0-51.dev.gitfdd8055.fc28.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.0'
  SwapFree: 4208979968
  SwapTotal: 4208979968
  arch: amd64
  cpus: 4
  hostname: bollard
  kernel: 4.17.19-200.fc28.x86_64
  os: linux
  uptime: 10m 51.89s
insecure registries:
  registries: []
registries:
  registries:
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.access.redhat.com
  - registry.centos.org
store:
  ContainerStore:
    number: 0
  GraphDriverName: vfs
  GraphOptions: []
  GraphRoot: /var/home/rishi/.local/share/containers/storage
  GraphStatus: {}
  ImageStore:
    number: 3
  RunRoot: /run/user/1000/run

Additional environment details (AWS, VirtualBox, physical, etc.):

This is a physical laptop running Fedora 28 Silverblue 28.20180908.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions