-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (24 loc) · 910 Bytes
/
Dockerfile
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
# syntax=quay.io/astronomer/airflow-extensions:v1
FROM quay.io/astronomer/astro-runtime:11.9.0
# Create virtual environment to install Meltano in
USER astro
PYENV 3.11 meltano_env meltano_requirements.txt
# Intall git for Meltano plugin installation
USER root
RUN apt-get update
RUN apt-get -y install git
# Set reusable environment variables
ENV MELTANO_EXECUTABLE /home/astro/.venv/meltano_env/bin/meltano
ENV MELTANO_FOLDER /home/astro/.venv/meltano_env/meltano
# Copy the Meltano project to the virtual environment
COPY meltano ${MELTANO_FOLDER}
# Install the meltano plugins
WORKDIR ${MELTANO_FOLDER}
RUN ${MELTANO_EXECUTABLE} install
# Set astro as owner of the Meltano project to run the Meltano pipeline
RUN chown -R astro:astro ${MELTANO_FOLDER}
# Switch Back to Astro Defaults
USER ${ASTRONOMER_USER}
WORKDIR ${AIRFLOW_HOME}
ENTRYPOINT ["tini", "--", "/entrypoint"]
CMD ["airflow", "--help"]