2016-09-16 17:04:25 +03:00
# FROM gcr.io/ansible-tower-engineering/tower_devel:latest
FROM centos
RUN yum install -y epel-release
RUN yum install -y \
2016-09-27 23:25:32 +03:00
bzip2 \
2016-09-16 17:04:25 +03:00
python-pip \
python-virtualenv \
make \
swig \
git \
libffi-devel \
openssl-devel \
libxml2-devel \
xmlsec1-devel \
xmlsec1-openssl-devel \
gcc \
gcc-c++ \
/usr/bin/pg_config \
openldap-devel \
postgresql-devel \
2016-10-03 17:39:59 +03:00
rabbitmq-server \
2016-09-16 17:04:25 +03:00
libtool-ltdl-devel
# NOTE: The following steps work for tower-3.0.0
# RUN curl -LO https://rpm.nodesource.com/pub_0.12/el/7/x86_64/nodejs-0.12.9-1nodesource.el7.centos.x86_64.rpm
# RUN yum install -y nodejs-0.12.9-1nodesource.el7.centos.x86_64.rpm
# RUN rm nodejs-0.12.9-1nodesource.el7.centos.x86_64.rpm
# Remove the 2 lines below and uncomment the 3 lines above to build
# RPMs with the old JS build system.
RUN curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
2016-09-20 23:24:29 +03:00
2016-09-16 17:04:25 +03:00
RUN yum install -y nodejs
2016-09-20 23:24:29 +03:00
WORKDIR "/ansible-tower"
# Copy requirements files
2016-10-19 22:56:34 +03:00
# NOTE: '*' is not used as it invalidates docker caching
COPY requirements/requirements.txt requirements/
COPY requirements/requirements_ansible.txt requirements/
COPY requirements/requirements_dev.txt requirements/
COPY requirements/requirements_jenkins.txt requirements/
2016-09-20 23:24:29 +03:00
# Copy __init__.py so the Makefile can retrieve `awx.__version__`
COPY awx/__init__.py awx/
# Copy Makefile
COPY Makefile .
2016-09-21 23:34:30 +03:00
# Install tower runtime virtualenvs
2016-09-20 23:24:29 +03:00
ENV SWIG_FEATURES = "-cpperraswarn -includeall -I/usr/include/openssl"
RUN make requirements
2016-09-21 23:34:30 +03:00
# Install tower test requirements
ENV VENV_BASE = ""
RUN make requirements_jenkins
2016-09-20 23:24:29 +03:00
# Build front-end deps
COPY awx/ui/package.json awx/ui/
2016-09-16 17:04:25 +03:00
RUN npm set progress = false
2016-10-19 19:35:59 +03:00
RUN make ui-deps
2016-09-16 18:15:30 +03:00
2016-09-16 17:04:25 +03:00
ENTRYPOINT [ "/bin/bash" , "-c" ]
2016-09-16 18:15:30 +03:00
CMD [ "bash" ]