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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run script in a docker container #361

Open
ghnp5 opened this issue Jan 9, 2025 · 2 comments
Open

Run script in a docker container #361

ghnp5 opened this issue Jan 9, 2025 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@ghnp5
Copy link

ghnp5 commented Jan 9, 2025

Hey!
Is it possible to run the script in a docker container?

In other words - connect with SSH to remote server, then spin up container with image name provided and a list of volumes mounted, and then execute the script inside that container.

Is it possible with this action?

If not, then this is a feature request 😊

Many thanks!

@ghnp5 ghnp5 added the bug Something isn't working label Jan 9, 2025
@appleboy
Copy link
Owner

Could you please explain the context in which this requirement will be used?

@appleboy appleboy added question Further information is requested and removed bug Something isn't working labels Jan 21, 2025
@ghnp5
Copy link
Author

ghnp5 commented Jan 21, 2025

Hi!
The idea is to provide some isolation/security.

For example, by mounting a number of "read-only" volumes, and only one "write" volume. If something goes wrong with the script, the harm will be limited.

For now, I'm doing it manually:

  1. use ssh-action
  2. cat <<<'EOF' to /tmp/script.sh
  3. docker run ... -v ... -v ... sh /tmp/script.sh
  4. delete /tmp/script.sh

But ideally, it would be nice to be able to do this using the ssh-action directly :)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants
@appleboy @ghnp5 and others