containers / krunvm

Create microVMs from OCI images
Apache License 2.0
1.41k stars 42 forks source link

PATH not used to start command #20

Closed c3d closed 2 years ago

c3d commented 2 years ago

Running the following shows an example of the problem:

% krunvm start fedora-rawhide /bin/ls -- -l /bin/bash
-rwxr-xr-x 1 root root 1433752 Jul 20 22:00 /bin/bash
% krunvm start fedora-rawhide /bin/bash -- -c 'echo $PATH'
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
% krunvm start fedora-rawhide bash

The last command does not succeed. You need to pass /bin/path for it to work.

Note that this is somewhat inconsistent with podman usage for example, where podman run -it ubi8 bash works.

slp commented 2 years ago

This has been fixed in libkrun 1.3.0 / krunvm 0.2.1. Please let me know if the problem persists.

c3d commented 2 years ago

@slp Tested successfully on Linux (krunvm 0.2.2, libkrun 1.4.3 and libkrunfw 3.6.3) and macOS (krunvm 0.2.1 and 0.2.2, libkrun 1.4.4, libkrunfw 3.6.3). Thanks.