cartesi / machine-emulator

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

Add new docker like command line options #215

Closed edubart closed 6 months ago

edubart commented 6 months ago

This PR introduces --env, --workdir and --hostname Docker like options for convenience.

For instance you execute the following now:

cartesi-machine \
  --hostname=test-cm \
  --user=root  \
  --volume=.:/mnt \
  --workdir=/mnt \
  --env=VAR=1 \
  -it bash
Running in unreproducible mode!

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

root@test-cm:/mnt# env | grep VAR
VAR=1
root@test-cm:/mnt#

Looking more similar to docker run usage.