Can the --entrypoint command take any arguments? #728
Replies: 6 comments 1 reply
-
|
The commands and args come after the msb run <image> -- mycommand --flag valueAlso: msb run <image> --entrypoint mycommand -- --flag value |
Beta Was this translation helpful? Give feedback.
-
|
For some reason, this does not work with Counter test: |
Beta Was this translation helpful? Give feedback.
-
|
if your goal is to create and run, then what you did after is correct: msb run ubuntu --name test --entrypoint /usr/bin/env -- bash
|
Beta Was this translation helpful? Give feedback.
-
|
Got it, but when I set an entry point, I don't want to necessarily use it right away. Like with a Dockerfile, I would have expected that the entrypoint parameter sets the entry point for whenever the container (or VM, in case of Microsandbox) starts. |
Beta Was this translation helpful? Give feedback.
-
It actually works that way today. msb create python --name py --entrypoint bash # you can specify entrypoint when you start a sandbox msb exec py -- -c "echo hello" # and you can specify arguments to the entrypoint when you execThat's how Docker also handles entrypoint. But I think I understand what you mean, you want arguments as well when you create the VM. You can use scripts for that. msb create python --name py2 --script start='bash -c "echo hello"'msb exec py2 -- startYou can even have multiple scripts. We will also have |
Beta Was this translation helpful? Give feedback.
-
|
Just realized that msb create python --name py2 --script start=$'#!/bin/sh\necho hello\n'But i will fix that very soon so you don't have to specify the shebang. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I try to run a command with a flag as an entrypoint (like
mycommand --flag value). I didn't find a syntax that works. Is this possible at all?Beta Was this translation helpful? Give feedback.
All reactions