2015-11-23 21:36:22 +03:00
|
|
|
FROM centos:centos7
|
2014-10-01 15:44:44 +04:00
|
|
|
|
2015-09-17 19:09:57 +03:00
|
|
|
# Set the locale. This is mainly so that tests can write non-ascii files to
|
|
|
|
# disk.
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
|
2015-11-23 21:36:22 +03:00
|
|
|
ADD docker/mysql-community.gpg.key /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
|
|
|
|
ADD docker/nodesource.gpg.key /etc/pki/rpm-gpg/RPM-GPG-KEY-nodesource
|
2015-05-12 17:07:03 +03:00
|
|
|
|
2015-11-23 21:36:22 +03:00
|
|
|
# For mysql-python dependencies
|
|
|
|
ADD docker/mysql.repo /etc/yum.repos.d/mysql.repo
|
|
|
|
|
|
|
|
# This is temporary until https://bugzilla.mozilla.org/show_bug.cgi?id=1226533
|
|
|
|
ADD docker/nodesource.repo /etc/yum.repos.d/nodesource.repo
|
2015-05-12 17:07:03 +03:00
|
|
|
|
|
|
|
RUN yum update -y \
|
|
|
|
&& yum install -y \
|
2015-11-23 21:36:22 +03:00
|
|
|
# Supervisor is being used to start and keep our services running
|
2015-09-18 19:01:32 +03:00
|
|
|
supervisor \
|
2015-11-23 21:36:22 +03:00
|
|
|
# General (dev-) dependencies
|
2015-09-18 19:01:32 +03:00
|
|
|
bash-completion \
|
2015-05-12 17:07:03 +03:00
|
|
|
gcc-c++ \
|
2015-03-17 17:00:05 +03:00
|
|
|
curl \
|
2015-11-23 21:36:22 +03:00
|
|
|
make \
|
2015-05-12 17:07:03 +03:00
|
|
|
libjpeg-devel \
|
|
|
|
cyrus-sasl-devel \
|
|
|
|
libxml2-devel \
|
|
|
|
libxslt-devel \
|
2015-07-23 15:42:16 +03:00
|
|
|
zlib-devel \
|
2015-11-23 21:36:22 +03:00
|
|
|
libffi-devel \
|
|
|
|
openssl-devel \
|
|
|
|
python-devel \
|
|
|
|
# Git, because we're using git-checkout dependencies
|
|
|
|
git \
|
|
|
|
# Nodejs for less, stylus, uglifyjs and others
|
|
|
|
nodejs \
|
|
|
|
# Dependencies for mysql-python
|
|
|
|
mysql-community-devel \
|
|
|
|
mysql-community-client \
|
|
|
|
mysql-community-libs \
|
|
|
|
epel-release \
|
2015-08-07 06:20:42 +03:00
|
|
|
&& yum clean all
|
2014-10-01 15:44:44 +04:00
|
|
|
|
2015-11-23 21:36:22 +03:00
|
|
|
RUN yum install -y python-pip
|
|
|
|
|
|
|
|
# Until https://github.com/shazow/urllib3/commit/959d47d926e1331ad571dbfc150c9a3acb7a1eb9 lands
|
|
|
|
RUN pip install pyOpenSSL ndg-httpsclient pyasn1 certifi urllib3
|
2015-05-12 17:07:03 +03:00
|
|
|
|
2015-11-23 21:36:22 +03:00
|
|
|
# ipython / ipdb for easier debugging, supervisor to run services
|
|
|
|
RUN pip install ipython ipdb supervisor
|
|
|
|
|
|
|
|
# Install all python requires
|
2015-08-07 06:20:42 +03:00
|
|
|
COPY requirements /pip/requirements/
|
|
|
|
RUN cd /pip && \
|
|
|
|
pip install --build ./build --cache-dir ./cache \
|
2015-11-23 21:36:22 +03:00
|
|
|
--find-links https://pyrepo.stage.mozaws.net/olympia/ \
|
2015-09-15 00:59:37 +03:00
|
|
|
--no-index --no-deps \
|
|
|
|
-r requirements/docker.txt && \
|
2016-02-04 23:21:28 +03:00
|
|
|
pip install -e /code && \
|
2015-08-07 06:20:42 +03:00
|
|
|
rm -r build cache
|
2015-05-12 17:07:03 +03:00
|
|
|
|
2015-09-29 11:38:50 +03:00
|
|
|
# Install the node_modules.
|
|
|
|
RUN mkdir -p /srv/olympia-node
|
|
|
|
ADD package.json /srv/olympia-node/package.json
|
|
|
|
WORKDIR /srv/olympia-node
|
|
|
|
RUN npm install
|
2015-09-18 14:59:08 +03:00
|
|
|
COPY . /code
|
2015-08-07 06:20:42 +03:00
|
|
|
WORKDIR /code
|
2015-09-18 14:59:08 +03:00
|
|
|
|
|
|
|
# Preserve bash history across image updates.
|
|
|
|
# This works best when you link your local source code
|
|
|
|
# as a volume.
|
|
|
|
ENV HISTFILE /code/docker/artifacts/bash_history
|
2015-11-23 21:36:22 +03:00
|
|
|
|
2015-09-18 14:59:08 +03:00
|
|
|
# Configure bash history.
|
|
|
|
ENV HISTSIZE 50000
|
|
|
|
ENV HISTIGNORE ls:exit:"cd .."
|
2015-11-23 21:36:22 +03:00
|
|
|
|
2015-09-18 14:59:08 +03:00
|
|
|
# This prevents dupes but only in memory for the current session.
|
|
|
|
ENV HISTCONTROL erasedups
|
2015-09-29 11:38:50 +03:00
|
|
|
|
|
|
|
ENV CLEANCSS_BIN /srv/olympia-node/node_modules/clean-css/bin/cleancss
|
|
|
|
ENV LESS_BIN /srv/olympia-node/node_modules/less/bin/lessc
|
|
|
|
ENV STYLUS_BIN /srv/olympia-node/node_modules/stylus/bin/stylus
|
|
|
|
ENV UGLIFY_BIN /srv/olympia-node/node_modules/uglify-js/bin/uglifyjs
|
2015-12-04 02:43:49 +03:00
|
|
|
ENV VALIDATOR_BIN /srv/olympia-node/node_modules/addons-validator/bin/addons-validator
|