Skip to content
masterclass Buddy

Docker · Directive

SHELL

SHELL sets the default shell used by later shell-form RUN, CMD, and ENTRYPOINT instructions. Use exec-form JSON syntax to name the shell and its arguments.

Last updated

Syntax

SHELL ["executable", "parameter"]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • RUN
  • CMD
  • ENTRYPOINT
  • FROM
  • ARG
  • escape parser directive

Source: Dockerfile reference. Checked 2026-11-03.