Run script in a docker container
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!
Bug fix
Could you please explain the context in which this requirement will be used?
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:
- use
ssh-action -
cat <<<'EOF'to/tmp/script.sh -
docker run ... -v ... -v ... sh /tmp/script.sh - delete
/tmp/script.sh
But ideally, it would be nice to be able to do this using the ssh-action directly :)
Thanks!