1

The problem

When building a docker image for apache airflow, build fails at RUN pip install -r requirements.txt (when installing pycurl package) with:

Permission denied: 'curl-config'

What I think the problem is

I think this problem relates to airflow insisting on packages in requirements.txt being installed by a non-root user (ie 'airflow'). When adding USER root to the dockerfile, it errors out with You are running pip as root. Please use 'airflow' user to run pip!

Other non-airflow docker containers are installing their packages without seeing this issue

What I've tried

  • creating a docker group, adding the user and owning the socket - every type of answer listed here
  • removing the requirements.txt step and adding the packages instead to the docker-compose.yaml file as suggested here
  • changing the airflow user id to 50000

None of this has resolved the problem - it is always the same error.

Code I'm using

The code I'm using can be got from here:

curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.5.2/docker-compose.yaml

I am following this install documentation

The requirements are:

awscli==1.20.65 
beeline==0.0.9a0 
boto3==1.18.65 
botocore==1.21.65
croniter==1.0.15
elasticsearch==7.13.4
setuptools==58.5.3
Jinja2==2.11.3
krbticket==1.0.6 
pycurl==7.44.1 
PyHive==0.6.4
pyhocon==0.3.58 
requests-kerberos==0.13.0 
requests==2.27.1
python-dotenv==0.20.0
impyla==0.17.0
pandas==1.5.3
Sanchez333
  • 318
  • 3
  • 11

1 Answers1

0

You should try

sudo curl -LfO 'https://airflow.apache.org/docs/apache-airflow/2.5.2/docker-compose.yaml'

To not get the permission denied, because the command needs to be run by the root user.

Ania Warzecha
  • 1,796
  • 13
  • 26