cartesi / machine-emulator

The off-chain implementation of the Cartesi Machine
GNU Lesser General Public License v3.0
64 stars 33 forks source link

feat: introduce the `--user` command line option #201

Closed edubart closed 6 months ago

edubart commented 6 months ago

This makes easier to test the cartesi machine as root, useful you are prototyping with virtio network and want to install packages. Also refactors how the default user is chosen, this is now set by tools init script (this is more appropriate since the user existence depends on it).

$ cartesi-machine --user=root id 

         .
        / \
      /    \
\---/---\  /----\
 \       X       \
  \----/  \---/---\
       \    / CARTESI
        \ /   MACHINE
         '

uid=0(root) gid=0(root) groups=0(root)

Halted
$ cartesi-machine id 

         .
        / \
      /    \
\---/---\  /----\
 \       X       \
  \----/  \---/---\
       \    / CARTESI
        \ /   MACHINE
         '

uid=1000(dapp) gid=1000(dapp) groups=1000(dapp)

Depends on