Is there an enroot equivalent to docker run?

33 views Asked by At

I have a simple container, that I've built with a Dockerfile. I am running on Ubuntu-20.04 with enroot-3.4.1-1 and Docker version 26.0.0.

My Dockerfile takes a simple executable (compiled from C) and prints out 'Hello World', i.e. :

# syntax=docker/dockerfile:1
FROM scratch
ADD hello /
CMD ["./hello"]

I can run this image :

root@head01:/home/user/Scratch# docker image ls
REPOSITORY    TAG       IMAGE ID       CREATED         SIZE
hello         latest    d08237299659   7 hours ago     872kB
.
.
.
root@head01:/home/user/Scratch# docker run hello
Hello World

I exported my docker image to a squashfs file via :

root@head01:~# mkdir dockerout
root@head01:~# docker export optimistic_almeida | tar -C dockerout -p -s --same-owner -xv    
root@head01:~# mksquashfs dockerout hello.sqsh

Now if I try to run this with enroot

root@head01:/home/user/Scratch# enroot start hello.sqsh
enroot-switchroot: failed to execute: /bin/sh: No such file or directory

Question :

  1. Is there an enroot equivalent to docker run that just executes the CMD form the Dockerfile? It seems like enroot wants an interactive session but I don't think I built in a shell for it.
0

There are 0 answers