launchrctl / launchr

Launchr is a CLI action runner that executes actions inside short-lived local containers.
Apache License 2.0
10 stars 2 forks source link

64: add entrypoint option allowed to run direct container command #34

Closed DeNevero closed 3 months ago

davidferlay commented 5 months ago

Working as expected :ok_hand:

➜ ./launchrctl platform:nodes --entrypoint sh       
Image "platform-actions-nodes:latest" exists locally
/host $ 
/host $ whoami
plasma

/host $ 
➜ ./launchrctl platform:nodes --entrypoint "ls -lah"
Image "platform-actions-nodes:latest" exists locally
total 19M    
drwxr-xr-x    1 plasma   plasma       740 Mar 15 11:39 .
drwxr-xr-x    1 root     root         154 Mar 15 11:40 ..
drwxr-xr-x    1 plasma   plasma        44 Mar 15 11:38 .compose
drwxr-xr-x    1 plasma   plasma       226 Mar 15 11:39 .git
-rw-r--r--    1 plasma   plasma       170 Feb 21 10:00 .gitignore
-rwxr-xr-x    1 plasma   plasma     13.8M Mar 15 11:39 plasmactl
drwxr-xr-x    1 plasma   plasma       134 Feb  6 14:17 platform
drwxr-xr-x    1 plasma   plasma       160 Mar  7 10:54 scripts
drwxr-xr-x    1 plasma   plasma        98 Jan 26 14:31 toolbox
-rw-r--r--    1 plasma   plasma         9 Mar 14 16:42 vault

Let's have some code review

davidferlay commented 5 months ago

Tested ok :ok_hand:


➜ ./launchrctl platform:nodes --exec sh      
Image "platform-actions-nodes:latest" exists locally
/host $ ls
README.md            ansible_collections  compose.yaml         foundation           library              launchrctl            toolbox
README.svg           build_3339857242     file_from_domain     integration          origin               platform
ansible.cfg          cognition            flow_map.svg         interaction          plasma               scripts
/host $ ps aux
PID   USER     TIME  COMMAND
    1 plasma    0:00 sh
    8 plasma    0:00 ps aux

/host $ 
➜ ./launchrctl platform:nodes --exec whoami
Image "platform-actions-nodes:latest" exists locally
plasma