-
Notifications
You must be signed in to change notification settings - Fork 114
/
Dockerfile.testing
26 lines (18 loc) · 1.09 KB
/
Dockerfile.testing
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
# Dockerfile for usaspending-test image
# If any changes are made to the usaspending-backend image (Dockerfile) then this image needs to be rebuilt to stay in sync.
# If you do not already have the `usaspending-backend` image locally you can build it by running:
# docker compose --profile usaspending build
# in the parent usaspending-api directory.
FROM usaspending-backend:latest
WORKDIR /usaspending-api
# Install Java for PySpark
RUN yum install -y java-1.8.0-openjdk-devel
RUN export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.382.b05-1.el7_9.x86_64
RUN export PATH=$JAVA_HOME/bin:$PATHv
# Prevent a Pytest RuntimeError where it expects the parent directory to be the name of an installed Django app
# This will cause a RuntimeError because `dockermount` isn't the name of an installed Django app, so we move the files
# to a `/usaspending-api` parent directory which is the name of an installed Django app.
RUN mv /dockermount/* /usaspending-api/
# Copy .env.template file for config tests
COPY .env.template /usaspending-api/
RUN python3 -m pip install -r requirements/requirements-dev.txt