-
Notifications
You must be signed in to change notification settings - Fork 35
Labels
bugSomething is broken or not working as expectedSomething is broken or not working as expected
Description
Bug information
Steps to reproduce (required)
- Run the Test Samples (K3D) workflow. The workflow triggers a Dockerfile build in
samples/volumes/Dockerfile. - The build step executes
RUN python3 -m pip install --upgrade pip setuptools wheel && python3 -m pip install --no-cache-dir -r requirements.txton an Alpine Python image.
Observed behavior (required)
- The build fails with the following error:
ERROR: Cannot uninstall 'packaging'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
ERROR: process "/bin/sh -c python3 -m pip install --upgrade pip setuptools wheel && python3 -m pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1
- This error originates from the existing
packagingdistutils project in the image. Pip cannot uninstall it cleanly. - The failure is traced to this line in the Dockerfile:
RUN python3 -m pip install --upgrade pip setuptools wheel
&& python3 -m pip install --no-cache-dir -r requirements.txt
Desired behavior (required)
- The Docker image build and all workflow steps should complete successfully.
Workaround (optional)
- Use a Python base image that does not have distutils-preinstalled packages or
- Specify
--ignore-installedfor pip, or - Update the Dockerfile step to check for an existing installation and avoid upgrading/distutils uninstall.
Suggested fix
- Consider switching to a Python official base image (e.g. python:3.10-alpine instead of alpine:3.14) which installs packages cleanly via pip.
- Alternatively, update the Dockerfile to explicitly install
packagingbefore upgrading pip, or use--ignore-installedwith pip install. - See the logs in Workflow Run 21015933695/job/63031933365 for context.
System information
rad Version (required)
Operating system (required)
Additional context
- Dockerfile: samples/volumes/Dockerfile
- Workflow failure logs: Workflow Run 21015933695/job/63031933365
- Error details: See above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething is broken or not working as expectedSomething is broken or not working as expected