opencontainers / image-tools

OCI Image Tooling
https://opencontainers.org
Apache License 2.0
266 stars 83 forks source link

example in README does not work #222

Open FlorianLudwig opened 4 years ago

FlorianLudwig commented 4 years ago

Executing the examples from the README don't work.

For example the first one:

$ oci-image-tool create --ref tag=latest busybox-oci busybox-bundle
criteria "tag" unimplemented

seems to have changed the CLI arguments (quite some time ago)[https://github.com/opencontainers/image-tools/issues/193#issuecomment-364633491].

jedichen121 commented 4 years ago

For the README example, using name works ref.

However, I still couldn't run the example. It reported

WARN[0000] exit status 1                                
WARN[0000] no directory specified for freezer.state     
WARN[0000] lstat : no such file or directory            
ERRO[0000] container_linux.go:348: starting container process caused: process_linux.go:438: container init caused: open /dev/ptmx: no such file or directory 
container_linux.go:348: starting container process caused: process_linux.go:438: container init caused: open /dev/ptmx: no such file or directory

Then I removed the config.json file and used runc spec to generate a new one and modified the "args" to be "/rootfs/bin/sh". And now it reports permission issue. Though I'm already using sudo.

ERRO[0000] container_linux.go:348: starting container process caused: exec: "/rootfs/bin/sh": stat /rootfs/bin/sh: permission denied 
container_linux.go:348: starting container process caused: exec: "/rootfs/bin/sh": stat /rootfs/bin/sh: permission denied

Any help appreciated.

cyphar commented 4 years ago

This project is no longer actively maintained. However, umoci is a much more full-featured tool for manipulating OCI images, and is now an OCI project as a reference implementation of the OCI image-spec. I would strongly suggest people move to using umoci.