diff options
author | Ethan P <32112321+eth-p@users.noreply.github.com> | 2020-10-10 15:20:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-10 15:20:57 -0700 |
commit | acc370d345245d6060ea0893e04d8780f29b5b20 (patch) | |
tree | 1f7cfd38c2d84422a0320d13440b4276112d5318 | |
parent | 3bcb5452aa91e527d04cbfc33f81395618db4959 (diff) | |
parent | 457ab84065416e3d9c0ff7dc4ea7f8902fb09eb6 (diff) |
Merge pull request #1305 from grg121/1213-dockerfile-syntax-highlighting-test
Add basic Dockerfile syntax highlighting test files
-rw-r--r-- | tests/syntax-tests/highlighted/Dockerfile/Dockerfile | 19 | ||||
-rw-r--r-- | tests/syntax-tests/source/Dockerfile/Dockerfile | 19 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/syntax-tests/highlighted/Dockerfile/Dockerfile b/tests/syntax-tests/highlighted/Dockerfile/Dockerfile new file mode 100644 index 00000000..fcbe51c1 --- /dev/null +++ b/tests/syntax-tests/highlighted/Dockerfile/Dockerfile @@ -0,0 +1,19 @@ +[38;2;249;38;114mARG [0m[38;2;248;248;242marchitecture=amd64[0m +[38;2;249;38;114mFROM[0m[38;2;248;248;242m $architecture/centos:[0m[38;2;166;226;46m7[0m +[38;2;249;38;114mLABEL [0m[38;2;248;248;242mcom.example.version=[0m[38;2;230;219;116m"[0m[38;2;230;219;116m0.2.1-beta[0m[38;2;230;219;116m"[0m +[38;2;249;38;114mARG [0m[38;2;248;248;242marchitecture[0m + +[38;2;249;38;114mENV [0m[38;2;248;248;242mINTERESTING_PATH /usr/bin/interesting-software[0m + + +[38;2;249;38;114mCOPY[0m[38;2;248;248;242m entrypoint.sh /usr/bin/entrypoint.sh[0m + +[38;2;249;38;114mRUN [0m[38;2;248;248;242mif [ [0m[38;2;230;219;116m"[0m[38;2;230;219;116m$architecture[0m[38;2;230;219;116m"[0m[38;2;248;248;242m = [0m[38;2;230;219;116m"[0m[38;2;230;219;116mi386[0m[38;2;230;219;116m"[0m[38;2;248;248;242m ]; then echo [0m[38;2;230;219;116m"[0m[38;2;230;219;116mBuilding i386 docker image[0m[38;2;230;219;116m"[0m[38;2;248;248;242m && \[0m +[38;2;248;248;242m linux32 yum update -y && linux32 yum install -y mysql ; \[0m +[38;2;248;248;242m else yum update -y && yum install -y mysql[0m + +[38;2;249;38;114mEXPOSE [0m[38;2;248;248;242m80/tcp[0m + +[38;2;249;38;114mVOLUME [0m[38;2;248;248;242m[/var/lib/mysql/data][0m + +[38;2;249;38;114mENTRYPOINT [0m[38;2;248;248;242m[[0m[38;2;230;219;116m"[0m[38;2;230;219;116m/usr/bin/entrypoint.sh[0m[38;2;230;219;116m"[0m[38;2;248;248;242m][0m diff --git a/tests/syntax-tests/source/Dockerfile/Dockerfile b/tests/syntax-tests/source/Dockerfile/Dockerfile new file mode 100644 index 00000000..54a3b2c8 --- /dev/null +++ b/tests/syntax-tests/source/Dockerfile/Dockerfile @@ -0,0 +1,19 @@ +ARG architecture=amd64 +FROM $architecture/centos:7 +LABEL com.example.version="0.2.1-beta" +ARG architecture + +ENV INTERESTING_PATH /usr/bin/interesting-software + + +COPY entrypoint.sh /usr/bin/entrypoint.sh + +RUN if [ "$architecture" = "i386" ]; then echo "Building i386 docker image" && \ + linux32 yum update -y && linux32 yum install -y mysql ; \ + else yum update -y && yum install -y mysql + +EXPOSE 80/tcp + +VOLUME [/var/lib/mysql/data] + +ENTRYPOINT ["/usr/bin/entrypoint.sh"]
\ No newline at end of file |