diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4a16a0aaba0d4fd048dc033d119799e054bd1e9b..230ca698ad07eb47a7d0d81d7f31fd87b2f5afa9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -11,6 +11,7 @@ variables:
   NODE_ENV: "test"
   SIMPLECOV: "true"
   GIT_DEPTH: "20"
+  GIT_SUBMODULE_STRATEGY: "none"
   PHANTOMJS_VERSION: "2.1.1"
   GET_SOURCES_ATTEMPTS: "3"
   KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/${CI_PROJECT_NAME}/rspec_report-master.json
diff --git a/changelogs/unreleased/zj-dockerfiles.yml b/changelogs/unreleased/zj-dockerfiles.yml
new file mode 100644
index 0000000000000000000000000000000000000000..40cb7dcfb76bb88ec685d793fdd63b073d311f99
--- /dev/null
+++ b/changelogs/unreleased/zj-dockerfiles.yml
@@ -0,0 +1,4 @@
+---
+title: Dockerfiles templates are imported from gitlab.com/gitlab-org/Dockerfile
+merge_request: 10663
+author:
diff --git a/lib/gitlab/template/dockerfile_template.rb b/lib/gitlab/template/dockerfile_template.rb
index d5d3e045a42d8db432f7436cdbdd30c2a4a581c6..20b054b0bd8e04ad11d1aaceda9ba253e54a1cac 100644
--- a/lib/gitlab/template/dockerfile_template.rb
+++ b/lib/gitlab/template/dockerfile_template.rb
@@ -8,7 +8,7 @@ def content
 
       class << self
         def extension
-          'Dockerfile'
+          '.Dockerfile'
         end
 
         def categories
@@ -18,7 +18,7 @@ def categories
         end
 
         def base_dir
-          Rails.root.join('vendor/dockerfile')
+          Rails.root.join('vendor/Dockerfile')
         end
 
         def finder(project = nil)
diff --git a/lib/tasks/gitlab/update_templates.rake b/lib/tasks/gitlab/update_templates.rake
index cb2adc81c9dea13a0b3734a2ee81dfbd4fd81582..1b04e1350ed1283d97761f8707ee2ce18b55241c 100644
--- a/lib/tasks/gitlab/update_templates.rake
+++ b/lib/tasks/gitlab/update_templates.rake
@@ -5,7 +5,7 @@ namespace :gitlab do
   end
 
   def update(template)
-    sub_dir = template.repo_url.match(/([a-z-]+)\.git\z/)[1]
+    sub_dir = template.repo_url.match(/([A-Za-z-]+)\.git\z/)[1]
     dir = File.join(vendor_directory, sub_dir)
 
     unless clone_repository(template.repo_url, dir)
@@ -45,7 +45,11 @@ namespace :gitlab do
     Template.new(
       "https://gitlab.com/gitlab-org/gitlab-ci-yml.git",
       /(\.{1,2}|LICENSE|CONTRIBUTING.md|Pages|autodeploy|\.gitlab-ci.yml)\z/
-    )
+    ),
+    Template.new(
+      "https://gitlab.com/gitlab-org/Dockerfile.git",
+      /(\.{1,2}|LICENSE|CONTRIBUTING.md|\.Dockerfile)\z/
+    ),
   ].freeze
 
   def vendor_directory
diff --git a/spec/features/projects/files/dockerfile_dropdown_spec.rb b/spec/features/projects/files/dockerfile_dropdown_spec.rb
index a7cc98a205936c5efa512727f654a94bed5499bd..548131c7cd48861d3ce2d82f734f31af52286d1b 100644
--- a/spec/features/projects/files/dockerfile_dropdown_spec.rb
+++ b/spec/features/projects/files/dockerfile_dropdown_spec.rb
@@ -1,11 +1,14 @@
 require 'spec_helper'
+require 'fileutils'
 
 feature 'User wants to add a Dockerfile file', feature: true do
   before do
     user = create(:user)
     project = create(:project)
     project.team << [user, :master]
+
     login_as user
+
     visit namespace_project_new_blob_path(project.namespace, project, 'master', file_name: 'Dockerfile')
   end
 
@@ -15,11 +18,14 @@
 
   scenario 'user can pick a Dockerfile file from the dropdown', js: true do
     find('.js-dockerfile-selector').click
+
     wait_for_ajax
+
     within '.dockerfile-selector' do
       find('.dropdown-input-field').set('HTTPd')
       find('.dropdown-content li', text: 'HTTPd').click
     end
+
     wait_for_ajax
 
     expect(page).to have_css('.dockerfile-selector .dropdown-toggle-text', text: 'HTTPd')
diff --git a/vendor/Dockerfile/CONTRIBUTING.md b/vendor/Dockerfile/CONTRIBUTING.md
new file mode 100644
index 0000000000000000000000000000000000000000..91b92eafa1b427382f221aae69e555380eee8612
--- /dev/null
+++ b/vendor/Dockerfile/CONTRIBUTING.md
@@ -0,0 +1,5 @@
+The canonical repository for `Dockerfile` templates is
+https://gitlab.com/gitlab-org/Dockerfile.
+
+GitLab only mirrors the templates. Please submit your merge requests to 
+https://gitlab.com/gitlab-org/Dockerfile.
diff --git a/vendor/dockerfile/HTTPdDockerfile b/vendor/Dockerfile/HTTPd.Dockerfile
similarity index 100%
rename from vendor/dockerfile/HTTPdDockerfile
rename to vendor/Dockerfile/HTTPd.Dockerfile
diff --git a/vendor/Dockerfile/LICENSE b/vendor/Dockerfile/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..d6c93c6fcf775605c4d7066cb976f3ac11ee9c83
--- /dev/null
+++ b/vendor/Dockerfile/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-2017 GitLab.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/Dockerfile/PHP.Dockerfile b/vendor/Dockerfile/PHP.Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..6b098efcd85c812be3eb60fa1c53f4e485a51cc8
--- /dev/null
+++ b/vendor/Dockerfile/PHP.Dockerfile
@@ -0,0 +1,14 @@
+FROM php:7.0-apache
+
+# Customize any core extensions here
+#RUN apt-get update && apt-get install -y \
+#        libfreetype6-dev \
+#        libjpeg62-turbo-dev \
+#        libmcrypt-dev \
+#        libpng12-dev \
+#    && docker-php-ext-install -j$(nproc) iconv mcrypt \
+#    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
+#    && docker-php-ext-install -j$(nproc) gd
+
+COPY config/php.ini /usr/local/etc/php/
+COPY src/ /var/www/html/
diff --git a/vendor/Dockerfile/Python2.Dockerfile b/vendor/Dockerfile/Python2.Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..c9a03584d405a4fa98f3c684ed24504c73f5327a
--- /dev/null
+++ b/vendor/Dockerfile/Python2.Dockerfile
@@ -0,0 +1,11 @@
+FROM python:2.7
+
+RUN mkdir -p /usr/src/app
+WORKDIR /usr/src/app
+
+COPY requirements.txt /usr/src/app/
+RUN pip install --no-cache-dir -r requirements.txt
+
+COPY . /usr/src/app
+
+CMD ["python", "app.py"]