Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

sunodo shell should provide an option to define the shell to use #469

Open
endersonmaia opened this issue Apr 17, 2024 · 13 comments
Open

sunodo shell should provide an option to define the shell to use #469

endersonmaia opened this issue Apr 17, 2024 · 13 comments
Assignees
Labels
feature triage Waiting for triage from dev team

Comments

@endersonmaia
Copy link
Contributor

馃摎 Context

The shell that's called by sunodo shell is hardcoded to /bin/bash.

It should be possible to define another shell.

鉁旓笍 Solution

Default to /bin/bash and add a --shell argument to define a different one.

sundo shell --shell=/bin/sh

@omidasadpour
Copy link
Contributor

omidasadpour commented Apr 18, 2024

It should be possible to define another shell.

Can you describe why it is needed ?

as far as I know this sub-command starts a shell in cartesi machine of application that is a docker container that has bash.
So, why should we consider other shells ?

@endersonmaia
Copy link
Contributor Author

It should be possible to define another shell.

Can you describe why it is needed ?

as far as I know this sub-command starts a shell in cartesi machine of application that is a docker container that has bash. So, why should we consider other shells ?

I'm working on a small image with busybox, and face the problem of not having /bin/bash in place.

I could fix it easily by creating a symlink, but It felt weird having to do this.

We could have a default and allow to change for whatever shell (busybox sh, /bin/sh, '/bin/zsh...) or at least document somewhere that the image needs a /bin/bash in place.

Also, my suggestion looks weird reading this afterward, this shell --shell repetition is odd.

@omidasadpour
Copy link
Contributor

omidasadpour commented Apr 18, 2024

Also, my suggestion looks weird reading this afterward, this shell --shell repetition is odd.

could use shellpath arg.

I'll send a PR.

@tuler
Copy link
Contributor

tuler commented Apr 22, 2024

Why don't we provide an option to exec something in the cartesi machine, instead of having a specific command for shell?
Something like sunodo exec instead of sunodo shell.

sunodo exec can be confused with sunodo run, but I think we can think about it.

An interactive flag may also be necessary.

@omidasadpour
Copy link
Contributor

omidasadpour commented Apr 23, 2024

Why don't we provide an option to exec something in the cartesi machine, instead of having a specific command for shell? Something like sunodo exec instead of sunodo shell.

sunodo exec can be confused with sunodo run, but I think we can think about it.

An interactive flag may also be necessary.

U mean Something like this ?

sunodo exec --command "ls -la"

@tuler
Copy link
Contributor

tuler commented Apr 23, 2024

I mean sunodo exec /bin/sh

@endersonmaia
Copy link
Contributor Author

I mean sunodo exec /bin/sh

My worry with exec is the confusion with the docker exec, where it's expected that the command is going to be executed in an already running container.

@tuler
Copy link
Contributor

tuler commented Apr 23, 2024

I mean sunodo exec /bin/sh

My worry with exec is the confusion with the docker exec, where it's expected that the command is going to be executed in an already running container.

Yeah, but sunodo run is already taken for the node execution.

@omidasadpour
Copy link
Contributor

I mean sunodo exec /bin/sh

I'm going to send a PR for it.

@tuler
Copy link
Contributor

tuler commented Apr 24, 2024

Is this customization really necessary?
Can't we have a shell that we know will always be there?
I want to minimize as much as possible new options and new commands. To keep sunodo as simple as possible for users.

@endersonmaia
Copy link
Contributor Author

Is this customization really necessary?

I created it as a feature request. It's necessary for my use case.

Can't we have a shell that we know will always be there?

We could have this as a requirement somewhere. After we start using the cruntime (#455) we won't need this and we can control what's inside the main rootfs.

I want to minimize as much as possible new options and new commands. To keep sunodo as simple as possible for users.

I agree.


We need a better development workflow written down somewhere so that collaborators don't start working on things that were not discussed and got a tag or milestone that defines a issue as good-to-go.

@tuler
Copy link
Contributor

tuler commented Apr 24, 2024

We could have this as a requirement somewhere. After we start using the cruntime (#455) we won't need this and we can control what's inside the main rootfs.

So I guess we can wait until cruntime is ready, and not implement this.

We need a better development workflow written down somewhere so that collaborators don't start working on things that were not discussed and got a tag or milestone that defines a issue as good-to-go.

A simple label can take care of that.

@tuler
Copy link
Contributor

tuler commented Apr 24, 2024

A simple label can take care of that.

triage is a popular one. Meaning: "people, we need to discuss this further, before implementing it"

@endersonmaia endersonmaia added the triage Waiting for triage from dev team label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature triage Waiting for triage from dev team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants