BigW Consortium Gitlab

dockerfile_template.rb 684 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
module Gitlab
  module Template
    class DockerfileTemplate < BaseTemplate
      def content
        explanation = "# This file is a template, and might need editing before it works on your project."
        [explanation, super].join("\n")
      end

      class << self
        def extension
11
          '.Dockerfile'
12 13 14 15 16 17 18 19 20
        end

        def categories
          {
            "General" => ''
          }
        end

        def base_dir
21
          Rails.root.join('vendor/Dockerfile')
22 23 24 25 26 27 28 29 30
        end

        def finder(project = nil)
          Gitlab::Template::Finders::GlobalTemplateFinder.new(self.base_dir, self.extension, self.categories)
        end
      end
    end
  end
end