diff options
author | Maxime Vidori <maxime.vidori@gmail.com> | 2017-03-28 11:21:29 +0200 |
---|---|---|
committer | Maxime Vidori <maxime.vidori@gmail.com> | 2017-03-28 11:21:29 +0200 |
commit | 8d6dced7b7bf0854089c185679420861888abaf2 (patch) | |
tree | 7bbd9a7879c4c7532bb776ad566a13a7dbcee1e0 /tests/examplefiles | |
parent | 0db8e281af377923115b894703b2b8beb8f1e9d5 (diff) | |
download | pygments-8d6dced7b7bf0854089c185679420861888abaf2.tar.gz |
Update Dockerfile lexer
Add Dockerfiles new keyword in the lexer
Improve lexer to parse json arrays on specific commands
Handle line breaks as a bash syntax
Diffstat (limited to 'tests/examplefiles')
-rw-r--r-- | tests/examplefiles/docker.docker | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/tests/examplefiles/docker.docker b/tests/examplefiles/docker.docker index d65385b6..1ae3c3a1 100644 --- a/tests/examplefiles/docker.docker +++ b/tests/examplefiles/docker.docker @@ -1,5 +1,34 @@ -maintainer First O'Last +FROM alpine:3.5 +MAINTAINER First O'Last +# comment run echo \ 123 $bar -# comment +RUN apk --update add rsync dumb-init + +# Test env with both syntax +ENV FOO = "BAR" +ENV FOO \ + "BAR" + +COPY foo "bar" +COPY foo \ + "bar" + +HEALTHCHECK \ + --interval=5m --timeout=3s \ + CMD curl -f http://localhost/ || exit 1 + +# ONBUILD keyword, then with linebreak +ONBUILD ADD . /app/src +ONBUILD \ + RUN echo 123 $bar + +# Potential JSON array parsing, mixed with linebreaks +VOLUME \ + /foo +VOLUME \ + ["/bar"] +VOLUME ["/bar"] +VOLUME /foo +CMD ["foo", "bar"] |