-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtests-Dockerfile
More file actions
37 lines (26 loc) · 1004 Bytes
/
tests-Dockerfile
File metadata and controls
37 lines (26 loc) · 1004 Bytes
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
FROM python:3.12
ARG AIRFLOW_HOME=/opt/airflow
# ENV PYTHONUNBUFFERED=1
ENV PYTEST_ADDOPTS="--color=yes"
ENV AIRFLOW_HOME=${AIRFLOW_HOME}
# Fix local build issue
RUN echo "Acquire::http::Pipeline-Depth 0;\nAcquire::http::No-Cache true;\nAcquire::BrokenProxy true;" > /etc/apt/apt.conf.d/99fixbadproxy
RUN apt-get update -y && apt-get install -y \
python3-pip libxmlsec1-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Pip Requirements
COPY tests/requirements.txt /
RUN pip3 install -r requirements.txt
# cache buster
RUN echo ${date}
# # Source Code Directory
RUN mkdir -p ${AIRFLOW_HOME}
COPY ./dags/ ${AIRFLOW_HOME}/dags
COPY ./plugins/ ${AIRFLOW_HOME}/plugins
COPY ./tests/ ${AIRFLOW_HOME}/tests
COPY ./tests/entrypoint.sh /entrypoint.sh
WORKDIR ${AIRFLOW_HOME}
ENTRYPOINT [ "/entrypoint.sh" ]
# For Testing; Keep Container Running to shell inside
# ENTRYPOINT [ "/bin/sh", "-c", "while true; do sleep 2 && echo 'sleeping for 2 seconds'; done;" ]
# ENTRYPOINT ["tail", "-f", "/dev/null"]