summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2025-01-08 22:18:29 +0200
committerVille Skyttä <ville.skytta@iki.fi>2025-01-08 22:26:14 +0200
commit3b6a5b6f3ab136673ac89fff525c435d758521d9 (patch)
tree9f0f2f496c2bf9e14fa7b191bd2a641ecb7a77f7
parentce1832f14b0bdd72575de96f1221a41c2420e5d4 (diff)
Add text/x-dockerfilework/scop/dockerfile
-rw-r--r--data/freedesktop.org.xml.in13
-rw-r--r--tests/mime-detection/Dockerfile2
-rw-r--r--tests/mime-detection/list2
-rw-r--r--tests/mime-detection/test.Dockerfile2
4 files changed, 19 insertions, 0 deletions
diff --git a/data/freedesktop.org.xml.in b/data/freedesktop.org.xml.in
index 6c6b1a1..0872d80 100644
--- a/data/freedesktop.org.xml.in
+++ b/data/freedesktop.org.xml.in
@@ -6943,6 +6943,19 @@ command to generate the output files.
<match type="string" value="#include" offset="0"/>
</magic>
</mime-type>
+ <mime-type type="text/x-dockerfile">
+ <comment>Docker container build file</comment>
+ <sub-class-of type="text/plain"/>
+ <!-- https://docs.docker.com/build/concepts/dockerfile/#filename -->
+ <glob pattern="Dockerfile"/>
+ <glob pattern="*.Dockerfile"/>
+ <glob pattern="Dockerfile.*"/>
+ <magic>
+ <!-- https://docs.docker.com/reference/dockerfile/#syntax -->
+ <!-- https://docs.docker.com/build/buildkit/frontend/ -->
+ <match type="string" value="# syntax=docker/dockerfile:" offset="0"/>
+ </magic>
+ </mime-type>
<mime-type type="text/x-asm">
<comment>Assembly code</comment>
<sub-class-of type="text/plain"/>
diff --git a/tests/mime-detection/Dockerfile b/tests/mime-detection/Dockerfile
new file mode 100644
index 0000000..7a0906d
--- /dev/null
+++ b/tests/mime-detection/Dockerfile
@@ -0,0 +1,2 @@
+# syntax=docker/dockerfile:1
+FROM scratch
diff --git a/tests/mime-detection/list b/tests/mime-detection/list
index 832e700..33c7a07 100644
--- a/tests/mime-detection/list
+++ b/tests/mime-detection/list
@@ -829,6 +829,8 @@ test.pdf.lz application/x-lzpdf ox
test.pdf.xz application/x-xzpdf ox
Makefile text/x-makefile ox
Makefile.gnu text/x-makefile ox
+Dockerfile text/x-dockerfile
+test.Dockerfile text/x-dockerfile
googleearth.kml application/vnd.google-earth.kml+xml ox
# Created using geojson.io
test.geojson application/geo+json ox
diff --git a/tests/mime-detection/test.Dockerfile b/tests/mime-detection/test.Dockerfile
new file mode 100644
index 0000000..7a0906d
--- /dev/null
+++ b/tests/mime-detection/test.Dockerfile
@@ -0,0 +1,2 @@
+# syntax=docker/dockerfile:1
+FROM scratch