2016-11-02 11:41:32 -04:00
|
|
|
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
|
2017-04-26 11:57:44 -04:00
|
|
|
'.Dockerfile'
|
2016-11-02 11:41:32 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def categories
|
|
|
|
{
|
|
|
|
"General" => ''
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
def base_dir
|
2017-04-26 11:57:44 -04:00
|
|
|
Rails.root.join('vendor/Dockerfile')
|
2016-11-02 11:41:32 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def finder(project = nil)
|
|
|
|
Gitlab::Template::Finders::GlobalTemplateFinder.new(self.base_dir, self.extension, self.categories)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|