V0lantis commented on issue #19001:
URL: https://github.com/apache/airflow/issues/19001#issuecomment-1006902950
Sorry for this comment, but actually my last Dockerfile wasn't properly
working. I had to write this dirty Dockerfile. I wonder if this is the correct
way, but I am sure this is not the place for this subject. I am just commenting
it here in case it could be useful to anyone :
```Dockerfile
FROM apache/airflow:2.2.1-python3.9
USER root
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential gcc git ssh
libpq-dev python3-dev \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
COPY requirements.txt .
RUN --mount=type=ssh,id=github_ssh_key pip install \
--no-cache \
--target /home/airflow/.local/lib/python3.9/site-packages \
-r requirements.txt --no-user
USER airflow
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]