I'm trying to use uv in a docker image build. As uv is meant to be a "drop-in replacement" I've pretty much done that, dropped it in, and its failing with a permissions error.
here is my Dockerfile, I'm aware of the new --system flag (#2046) so I'm using that.
ARG AIRFLOW_VERSION="2.4.1"
FROM apache/airflow:slim-${AIRFLOW_VERSION}-python3.10 as base
FROM base as development
USER root
RUN apt update && apt install -y unzip libsasl2-dev build-essential && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip ./aws/
USER airflow
COPY requirements-dev.txt requirements-dev.txt
RUN pip install uv && uv pip install --no-cache-dir --system -r requirements-dev.txt
requirements_dev.txt is simply this:
(my actual requirements file is far more complicated than this, but this is sufficient to repro the error)
The build (docker build --target development .) fails with
24.74 Caused by: failed to create directory /usr/local/lib/python3.10/site-packages/aiofiles-23.2.1.dist-info
24.74 Caused by: Permission denied (os error 13)
If I do not use uv:
ARG AIRFLOW_VERSION="2.4.1"
FROM apache/airflow:slim-${AIRFLOW_VERSION}-python3.10 as base
FROM base as development
USER root
RUN apt update && apt install -y unzip libsasl2-dev build-essential && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip ./aws/
USER airflow
COPY requirements-dev.txt requirements-dev.txt
RUN pip install --no-cache-dir --user -r requirements-dev.txt
then it works fine.
As uv is badged as a "drop-in replacement" is it fair to expect this to work? Any guidance on the best way to fix this would be appreciated!
I'm trying to use
uvin a docker image build. Asuvis meant to be a "drop-in replacement" I've pretty much done that, dropped it in, and its failing with a permissions error.here is my Dockerfile, I'm aware of the new
--systemflag (#2046) so I'm using that.requirements_dev.txt is simply this:
(my actual requirements file is far more complicated than this, but this is sufficient to repro the error)
The build (
docker build --target development .) fails withIf I do not use
uv:then it works fine.
As
uvis badged as a "drop-in replacement" is it fair to expect this to work? Any guidance on the best way to fix this would be appreciated!