diff --git a/CHANGELOG.md b/CHANGELOG.md index ac5dea0..cb01626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ - [shell-bash] add functions to outlined list - [markdown] added the ability to connect the backlight in 'code' by creating your own scheme 'markdown2:markdown2' - [markdown] highlight special all caps HTML tags +- [dockerfile] add a new schema for Dockerfile ## [1.2.0] - 2021-09-12 diff --git a/hrc/hrc/proto.hrc b/hrc/hrc/proto.hrc index b105883..e3d25d6 100644 --- a/hrc/hrc/proto.hrc +++ b/hrc/hrc/proto.hrc @@ -788,6 +788,12 @@ /\.nut$/i + + + /^[Dd]ockerfile\..+$/ + /^[Dd]ockerfile$/ + /^\s*FROM\b/ + diff --git a/hrc/hrc/scripts/dockerfile.hrc b/hrc/hrc/scripts/dockerfile.hrc new file mode 100644 index 0000000..056ef71 --- /dev/null +++ b/hrc/hrc/scripts/dockerfile.hrc @@ -0,0 +1,442 @@ + + + + + + + Dockerfile + + Based on: + https://docs.docker.com/reference/dockerfile/ + + Limitations: + 1. Comments within multiline instructions are not supported. + 2. Custom escape character is not supported. + 3. Shell is assumed to be a posix shell. There is no possability + to highlight as other shell (e.g. powershell). + 4. heredoc in RUN instruction is highlighted as a shell script. + Practically, it can be anything else (e.g. python script). + + TODO: + 1. Parse URIs in source parameters for ADD/COPY + 2. Highlight sources and destinations differently for ADD/COPY + 3. Recognize and hightlight image name for "COPY --from=..." + 4. Recognize and validate parameters for instructions + + Home: https://github.com/chpock/ck.colorer-schemes + Send requests there for bug fixes and features. + + + ]]> + + + + + /^[Dd]ockerfile\..+$/ + /^[Dd]ockerfile$/ + /^\s*FROM\b/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +