forked from mozilla/addons-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (53 loc) · 1.87 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
FROM mozillamarketplace/centos-mysql-mkt:0.2
# 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
# Fix multilib issues when installing openssl-devel.
RUN yum install -y --enablerepo=centosplus libselinux-devel && yum clean all
ADD docker-mysql.repo /etc/yum.repos.d/mysql.repo
RUN yum update -y \
&& yum install -y \
supervisor \
bash-completion \
gcc-c++ \
curl \
libjpeg-devel \
cyrus-sasl-devel \
libxml2-devel \
libxslt-devel \
nodejs \
zlib-devel \
mysql-community-libs-compat-5.6.14-3.el6.x86_64 \
&& yum clean all
# The version in the above image is ancient, and does not support the
# --no-binary flag used in our requirements files.
# We also need to install wheels.
RUN pip install -U pip wheel
COPY requirements /pip/requirements/
RUN cd /pip && \
pip install --build ./build --cache-dir ./cache \
--find-links https://pyrepo.stage.mozaws.net/ \
--no-index --no-deps \
-r requirements/docker.txt && \
rm -r build cache
# 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
COPY . /code
WORKDIR /code
# 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
# Configure bash history.
ENV HISTSIZE 50000
ENV HISTIGNORE ls:exit:"cd .."
# This prevents dupes but only in memory for the current session.
ENV HISTCONTROL erasedups
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