forked from frank-dspeed/openproject-docker
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
89 lines (78 loc) · 3.6 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#-- copyright
# OpenProject-docker is a set-up script for OpenProject using the
# 'Apache 2.0' licensed docker container engine. See
# http://docker.io and https://github.com/dotcloud/docker for details
#
# OpenProject is a project management system.
# Copyright (C) 2013 the OpenProject Foundation (OPF)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See COPYRIGHT.md for more details.
#++
FROM ubuntu:14.04
MAINTAINER OpenProject Foundation (opf), info@openproject.org
ENV DEBIAN_FRONTEND noninteractive
ENV OPF_BRANCH stable
# expose rails server port
EXPOSE 8080
# export ssh port; user is openproject; password will be generated and is dumped to stdout during the build
EXPOSE 22
#
# Install ruby and its dependencies
#
# RUN echo "deb http://archive.ubuntu.com/ubuntu saucy main universe" > /etc/apt/sources.list
RUN apt-get update -q
RUN locale-gen en_US en_US.UTF-8
RUN apt-get install -y --force-yes build-essential curl git zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev libxslt1-dev libmysqlclient-dev libpq-dev libsqlite3-dev libyaml-0-2 libmagickwand-dev libmagickcore-dev libmagickcore5-extra libgraphviz-dev libgvc6 ruby-dev
# Install utilities
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
# Add HTTPS support for APT. Passengers APT repository is stored on an HTTPS server.
RUN apt-get install -q -y --force-yes apt-transport-https ca-certificates
RUN echo 'deb https://oss-binaries.phusionpassenger.com/apt/passenger trusty main' > /etc/apt/sources.list.d/passenger.list
RUN chown root: /etc/apt/sources.list.d/passenger.list
RUN chmod 600 /etc/apt/sources.list.d/passenger.list
RUN apt-get update -q
RUN apt-get install -q -y --force-yes memcached subversion vim wget python-setuptools openssh-server sudo pwgen libcurl4-openssl-dev passenger
RUN easy_install supervisor
RUN mkdir /var/log/supervisor/
# see: http://flnkr.com/2013/12/creating-a-docker-ubuntu-13-10-image-with-openssh/
RUN mkdir /var/run/sshd
RUN /usr/sbin/sshd
RUN sed -i 's/.*session.*required.*pam_loginuid.so.*/session optional pam_loginuid.so/g' /etc/pam.d/sshd
RUN /bin/echo -e "LANG=\"en_US.UTF-8\"" > /etc/default/local
#
# Install MySQL
#
# RUN apt-get -y --force-yes -q install postgresql postgresql-client postgresql-contrib
RUN apt-get install -y --force-yes -q mysql-client mysql-server
RUN apt-get clean
#
# Setup OpenProject
#
ENV CONFIGURE_OPTS --disable-install-doc
ENV PATH /home/openproject/.rbenv/bin:$PATH
ADD ./files/Gemfile.local /Gemfile.local
ADD ./files/Gemfile.plugins /Gemfile.plugins
ADD ./files/setup_system.sh /usr/bin/setup_system
RUN chmod +x /usr/bin/setup_system && setup_system
ADD ./files/passenger-standalone.json /home/openproject/openproject/passenger-standalone.json
ADD ./files/start_openproject.sh /home/openproject/start_openproject.sh
ADD ./files/start_openproject_worker.sh /home/openproject/start_openproject_worker.sh
#
# And, finally, launch supervisord in foreground mode.
#
ADD ./files/supervisord.conf /etc/supervisord.conf
CMD ["supervisord", "-n"]
RUN echo "INFO: openproject ssh password: `cat /root/openproject-root-pw.txt`"