Commit d71d09e8 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'zj-dockerfiles' into 'master'

Submodule Dockerfile templates

See merge request !10663
parents 61afa9b5 df85a7c0
...@@ -11,6 +11,7 @@ variables: ...@@ -11,6 +11,7 @@ variables:
NODE_ENV: "test" NODE_ENV: "test"
SIMPLECOV: "true" SIMPLECOV: "true"
GIT_DEPTH: "20" GIT_DEPTH: "20"
GIT_SUBMODULE_STRATEGY: "none"
PHANTOMJS_VERSION: "2.1.1" PHANTOMJS_VERSION: "2.1.1"
GET_SOURCES_ATTEMPTS: "3" GET_SOURCES_ATTEMPTS: "3"
KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/${CI_PROJECT_NAME}/rspec_report-master.json KNAPSACK_RSPEC_SUITE_REPORT_PATH: knapsack/${CI_PROJECT_NAME}/rspec_report-master.json
......
---
title: Dockerfiles templates are imported from gitlab.com/gitlab-org/Dockerfile
merge_request: 10663
author:
...@@ -8,7 +8,7 @@ module Gitlab ...@@ -8,7 +8,7 @@ module Gitlab
class << self class << self
def extension def extension
'Dockerfile' '.Dockerfile'
end end
def categories def categories
...@@ -18,7 +18,7 @@ module Gitlab ...@@ -18,7 +18,7 @@ module Gitlab
end end
def base_dir def base_dir
Rails.root.join('vendor/dockerfile') Rails.root.join('vendor/Dockerfile')
end end
def finder(project = nil) def finder(project = nil)
......
...@@ -5,7 +5,7 @@ namespace :gitlab do ...@@ -5,7 +5,7 @@ namespace :gitlab do
end end
def update(template) 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) dir = File.join(vendor_directory, sub_dir)
unless clone_repository(template.repo_url, dir) unless clone_repository(template.repo_url, dir)
...@@ -45,7 +45,11 @@ namespace :gitlab do ...@@ -45,7 +45,11 @@ namespace :gitlab do
Template.new( Template.new(
"https://gitlab.com/gitlab-org/gitlab-ci-yml.git", "https://gitlab.com/gitlab-org/gitlab-ci-yml.git",
/(\.{1,2}|LICENSE|CONTRIBUTING.md|Pages|autodeploy|\.gitlab-ci.yml)\z/ /(\.{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 ].freeze
def vendor_directory def vendor_directory
......
require 'spec_helper' require 'spec_helper'
require 'fileutils'
feature 'User wants to add a Dockerfile file', feature: true do feature 'User wants to add a Dockerfile file', feature: true do
before do before do
user = create(:user) user = create(:user)
project = create(:project) project = create(:project)
project.team << [user, :master] project.team << [user, :master]
login_as user login_as user
visit namespace_project_new_blob_path(project.namespace, project, 'master', file_name: 'Dockerfile') visit namespace_project_new_blob_path(project.namespace, project, 'master', file_name: 'Dockerfile')
end end
...@@ -15,11 +18,14 @@ feature 'User wants to add a Dockerfile file', feature: true do ...@@ -15,11 +18,14 @@ feature 'User wants to add a Dockerfile file', feature: true do
scenario 'user can pick a Dockerfile file from the dropdown', js: true do scenario 'user can pick a Dockerfile file from the dropdown', js: true do
find('.js-dockerfile-selector').click find('.js-dockerfile-selector').click
wait_for_ajax wait_for_ajax
within '.dockerfile-selector' do within '.dockerfile-selector' do
find('.dropdown-input-field').set('HTTPd') find('.dropdown-input-field').set('HTTPd')
find('.dropdown-content li', text: 'HTTPd').click find('.dropdown-content li', text: 'HTTPd').click
end end
wait_for_ajax wait_for_ajax
expect(page).to have_css('.dockerfile-selector .dropdown-toggle-text', text: 'HTTPd') expect(page).to have_css('.dockerfile-selector .dropdown-toggle-text', text: 'HTTPd')
......
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.
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.
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/
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"]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment