Merge pull request #7363 from philipcristiano/pc/docker

Update Python Version
This commit is contained in:
Christopher Grebs 2018-01-26 07:04:38 +01:00 коммит произвёл GitHub
Родитель 4473a0c48e 0b362b0d95
Коммит d398e6050a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 114 добавлений и 87 удалений

Просмотреть файл

@ -1,49 +1,46 @@
FROM centos:centos7
FROM python:2.7.14-slim-stretch
# Allow scripts to detect we're running in our own container
RUN touch /addons-server-centos7-container
RUN touch /addons-server-docker-container
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
ADD docker/git.gpg.key /etc/pki/rpm-gpg/RPM-GPG-KEY-git
# For mysql-python dependencies
ADD docker/mysql.repo /etc/yum.repos.d/mysql.repo
ADD docker/nodesource.repo /etc/yum.repos.d/nodesource.repo
# Add nodesource repository and requirements
ADD docker/nodesource.gpg.key /etc/pki/gpg/GPG-KEY-nodesource
RUN apt-get update && apt-get install -y \
gnupg2 \
&& rm -rf /var/lib/apt/lists/*
# ADD docker/nodesource.repo /etc/yum.repos.d/nodesource.repo
RUN cat /etc/pki/gpg/GPG-KEY-nodesource | apt-key add -
ADD docker/debian-stretch-nodesource-repo /etc/apt/sources.list.d/nodesource.list
# For git dependencies
ADD docker/git.repo /etc/yum.repos.d/git.repo
# ADD docker/git.repo /etc/yum.repos.d/git.repo
# Upgrade git
RUN yum install -y \
RUN apt-get update && apt-get install -y \
# General (dev-) dependencies
bash-completion \
gcc-c++ \
build-essential \
curl \
make \
libjpeg-devel \
cyrus-sasl-devel \
libxml2-devel \
libxslt-devel \
zlib-devel \
libffi-devel \
openssl-devel \
python-devel \
libjpeg-dev \
libsasl2-dev \
libxml2-dev \
libxslt-dev \
locales \
zlib1g-dev \
libffi-dev \
libssl-dev \
python-dev \
python-pip \
nodejs \
npm \
# Git, because we're using git-checkout dependencies
git \
# Dependencies for mysql-python
mysql-community-devel \
mysql-community-client \
mysql-community-libs \
epel-release \
mysql-client \
default-libmysqlclient-dev \
swig \
gettext \
&& yum clean all
# Install Nodejs (for less, stylus, uglifyjs and others) separately, because
# it's part of epel which we just installed above.
RUN yum install -y nodejs
&& rm -rf /var/lib/apt/lists/*
# Compile required locale
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
@ -53,8 +50,6 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN yum install -y python-pip
COPY . /code
WORKDIR /code

Просмотреть файл

@ -1,4 +1,4 @@
FROM centos:centos7
FROM python:2.7.14-slim-stretch
# need to compile swig
ENV SWIG_FEATURES="-D__x86_64__"
@ -8,33 +8,40 @@ ENV SWIG_FEATURES="-D__x86_64__"
ENV OLYMPIA_UID=9500
RUN useradd -u ${OLYMPIA_UID} -s /sbin/nologin olympia
ADD docker/git.gpg.key /etc/pki/rpm-gpg/RPM-GPG-KEY-git
ADD docker/epel.gpg.key /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
ADD docker/nodesource.gpg.key /etc/pki/rpm-gpg/RPM-GPG-KEY-nodesource
# Add nodesource repository and requirements
ADD docker/nodesource.gpg.key /etc/pki/gpg/GPG-KEY-nodesource
RUN apt-get update && apt-get install -y \
gnupg2 \
&& rm -rf /var/lib/apt/lists/*
# ADD docker/nodesource.repo /etc/yum.repos.d/nodesource.repo
RUN cat /etc/pki/gpg/GPG-KEY-nodesource | apt-key add -
ADD docker/debian-stretch-nodesource-repo /etc/apt/sources.list.d/nodesource.list
ADD docker/epel.repo /etc/yum.repos.d/
ADD docker/git.repo /etc/yum.repos.d/git.repo
ADD docker/nodesource.repo /etc/yum.repos.d/nodesource.repo
RUN yum install -y \
gcc-c++ \
gettext \
RUN apt-get update && apt-get install -y \
# General (dev-) dependencies
bash-completion \
build-essential \
curl \
libjpeg-dev \
libsasl2-dev \
libxml2-dev \
libxslt-dev \
locales \
zlib1g-dev \
libffi-dev \
libssl-dev \
python-dev \
python-pip \
nodejs \
npm \
# Git, because we're using git-checkout dependencies
git \
libffi-devel \
libxml2-devel \
libxslt-devel \
make \
mariadb \
mariadb-devel \
nodejs \
openssl-devel \
python-devel \
swig \
uwsgi-2.0.13.1-2.el7 \
uwsgi-plugin-python \
&& yum clean all \
&& curl -sSL https://bootstrap.pypa.io/get-pip.py | python
git \
# Dependencies for mysql-python
mysql-client \
default-libmysqlclient-dev \
swig \
gettext \
&& rm -rf /var/lib/apt/lists/*
# Compile required locale
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
@ -55,7 +62,7 @@ RUN pip install --no-cache-dir --exists-action=w --no-deps -r requirements/syste
&& pip install --no-cache-dir --exists-action=w --no-deps -r requirements/prod_without_hash.txt\
&& pip install --no-cache-dir --exists-action=w --no-deps -e .
RUN echo -e "from olympia.lib.settings_base import *\n\
RUN echo "from olympia.lib.settings_base import *\n\
STYLUS_BIN = 'node_modules/stylus/bin/stylus'\n\
LESS_BIN = 'node_modules/less/bin/lessc'\n\
CLEANCSS_BIN = 'node_modules/clean-css-cli/bin/cleancss'\n\

Просмотреть файл

@ -1,6 +1,6 @@
.PHONY: help docs test test_es test_no_es test_force_db tdd test_failed initialize_db populate_data update_deps update_db update_assets initialize update reindex flake8 shell debug
IN_DOCKER = $(wildcard /addons-server-centos7-container)
IN_DOCKER = $(wildcard /addons-server-docker-container)
ifneq ($(IN_DOCKER),)
SUB_MAKEFILE = Makefile-docker

Просмотреть файл

@ -0,0 +1,2 @@
deb http://deb.nodesource.com/node_6.x stretch main
deb-src http://deb.nodesource.com/node_6.x stretch main

Просмотреть файл

@ -1,29 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
Comment: GPGTools - https://gpgtools.org
mQINBFQCN9QBEADv5QYOlCWNkI/oKST/GGpQkOZjFY2cbYdHuc2j8kyM4oeNluXq
puEYMHOoQvbJ3DFPvsv+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HXpfIKoAM7X2qfO+IFnLGTPyhFTcrl6vZBTMZTfZiC1XDQLuGUnd
sckuXINIU3DFWzZGr0QrqkuE/jyr7FXeUJj9B7cLo+s/TXo+RaVfi3kOc9BoxIvy
/qiNGs/TKy2/Ujqp/affmIMoMXSozKmga81JSwkADO1JMgUy6dApXz9kP4EE3g==
=CLGF
-----END PGP PUBLIC KEY BLOCK-----

Просмотреть файл

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# The current directory is a mounted volume, and is owned by the
# user running Docker on the host machine under linux (inc docker-machine).
#