-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
61 lines (49 loc) · 1.54 KB
/
Dockerfile
File metadata and controls
61 lines (49 loc) · 1.54 KB
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
FROM apache/airflow:slim-3.2.1-python3.14
LABEL maintainer="Luã Bida Vacaro <luabidaa@gmail.com>"
LABEL org.opencontainers.image.title="AlertFlow"
LABEL org.opencontainers.image.authors="InfoDengue Team"
LABEL org.opencontainers.image.source="https://github.com/AlertaDengue/AlertFlow"
LABEL org.opencontainers.image.version="latest"
LABEL org.opencontainers.image.description="Airflow containers system for AlertaDengue"
USER root
ARG HOST_UID
ARG HOST_GID
RUN apt-get update \
&& apt-get install -y \
curl \
git \
vim \
sed \
tar \
lzma \
libssl-dev \
libtk8.6 \
libgdm-dev \
libdb4o-cil-dev \
liblzma-dev \
libpcap-dev \
libbz2-dev \
libpq-dev \
python3-dev \
python3-venv \
postgresql-client \
wget \
gettext \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup --gid ${HOST_GID} airflow \
&& usermod -u ${HOST_UID} -g ${HOST_GID} -d /home/airflow -s /bin/bash airflow \
&& echo "airflow ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/airflow \
&& chmod 0440 /etc/sudoers.d/airflow \
&& chown -R ${HOST_UID}:${HOST_GID} ${AIRFLOW_HOME}/ /opt/airflow/
ENV PATH "$PATH:/home/airflow/.local/bin"
ENV PATH "$PATH:/usr/bin/dirname"
COPY --chown=airflow scripts/entrypoint.sh /entrypoint.sh
COPY --chown=airflow pyproject.toml README.md ${AIRFLOW_HOME}
RUN chmod +x /entrypoint.sh
USER airflow
RUN curl -sSL https://install.python-poetry.org | python3
WORKDIR ${AIRFLOW_HOME}
RUN poetry config virtualenvs.create false \
&& poetry install --no-root --only main --no-root
ENTRYPOINT [ "/entrypoint.sh" ]