<@U06RKAMK0UC> Is there a way to specify an image ...
# ask-ai
b
@ancient-wolf-19325 Is there a way to specify an image for a ShellTask to use without nesting tasks and without using ContainerTask
j
Yes, you can specify an image for a
ShellTask
using the
container_image
parameter directly. This avoids the need to nest tasks or use
ContainerTask
.
Copy code
from flytekit import ShellTask

shell_task = ShellTask(
    name="example_shell_task",
    script="echo Hello, Flyte!",
    container_image="your_custom_image:latest"
)
Would you like more details? Sources: - Flyte Community Discussion - Flyte Community Discussion 👍 1 button 👎 0 button 💡 Hint: Mention @ancient-wolf-19325 in the thread for followups.
a
@boundless-lifeguard-61788 was this helpful for you?
b
yes. I didn't have to go to the repo looking for the code that defines ShellTask