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 | d42aec5649913c3e78a7c2d6f0089feddc271c8b (patch) | |
| tree | 924f12b70fb2198be00811edc6f820af49ac57ff /tests/examplefiles | |
| parent | 1b966038502c0b386a6645d4b5125f623d0947bb (diff) | |
| download | pygments-git-d42aec5649913c3e78a7c2d6f0089feddc271c8b.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"] |
