summaryrefslogtreecommitdiffstats
path: root/tools/docker-compose/unit-tests/Dockerfile
blob: cb95cfc7d8b284a4e9887b928394b78b1f059c3e (plain)
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
# FROM gcr.io/ansible-tower-engineering/tower_devel:latest
FROM centos

RUN yum install -y epel-release

RUN yum install -y \
	bzip2 \
	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 \
    rabbitmq-server \
	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 -

RUN yum install -y nodejs

WORKDIR "/ansible-tower"

# Copy requirements files
COPY requirements/*.txt requirements/

# Copy __init__.py so the Makefile can retrieve `awx.__version__`
COPY awx/__init__.py awx/

# Copy Makefile
COPY Makefile .

# Install tower runtime virtualenvs
ENV SWIG_FEATURES="-cpperraswarn -includeall -I/usr/include/openssl"
RUN make requirements

# Install tower test requirements 
ENV VENV_BASE=""
RUN make requirements_jenkins

# Build front-end deps
COPY awx/ui/package.json awx/ui/

RUN npm set progress=false

RUN make ui-deps-built

ENTRYPOINT ["/bin/bash", "-c"]
CMD ["bash"]