tree-sitter-dockerfile/test/corpus/run.txt

100 lines
1.4 KiB
Plaintext
Raw Normal View History

2021-05-09 22:11:30 -04:00
==================
Shell command
==================
RUN echo "test"
---
(source_file
(run_instruction
(shell_command
(shell_fragment))))
2021-05-09 22:11:30 -04:00
==================
Shell command multiline
==================
RUN echo "test" \
"foo" \
bar
---
(source_file
(run_instruction
(shell_command
(shell_fragment)
(line_continuation)
(shell_fragment)
(line_continuation)
(shell_fragment))))
2021-05-09 22:11:30 -04:00
==================
Run with shell empty array
==================
run []
---
(source_file
(run_instruction
(json_string_array)))
2021-05-09 22:11:30 -04:00
==================
Run with shell array
==================
run ["echo", "test"]
---
(source_file
(run_instruction
(json_string_array
(json_string)
(json_string))))
2021-05-09 22:11:30 -04:00
2022-10-25 22:48:10 -04:00
==================
Run with options
==================
run --mount=type=secret,id=aws,target=/root/.aws/credentials \
--security=insecure \
aws s3 cp s3://example.com
---
(source_file
(run_instruction
(mount_param
(mount_param_param)
(mount_param_param)
(mount_param_param))
(line_continuation)
(param)
(line_continuation)
(shell_command
(shell_fragment))))
==================
Run with heredoc
==================
RUN cat <<EOF
test
EOF
---
(source_file
(run_instruction
(shell_command
(shell_fragment
(heredoc_marker)))
(heredoc_block
(heredoc_line)
(heredoc_end))))