Skip to content

Shell used for the run commands #2530

Closed
@un-def

Description

@un-def

Currently, which shell is used to execute commands depends on the image property:

  • if image is not specified, the dstackai/base image is used, and the shell is /bin/bash
  • otherwise, the shell is /bin/sh

elif self.run_spec.configuration.image is None: # dstackai/base
entrypoint = ["/bin/bash", "-i", "-c"]
commands = [_join_shell_commands(self._shell_commands())]
elif self._shell_commands(): # custom docker image with shell commands
entrypoint = ["/bin/sh", "-i", "-c"]
commands = [_join_shell_commands(self._shell_commands())]

This should be at least documented.

Plan

  • (required) document the current behavior
  • (optional but nice to have) add a new optional property shell keeping the current logic for the default value (bash for default dstackai/base images, sh for other images)
  • (optional) make dstackai/base images work with sh, make sh the default shell for all images

Metadata

Metadata

Assignees

Labels

docsImprovements or additions to documentationfeaturegood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions