Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile issue with --install-option=\"--prefix=/install\" #220

Open
aous72 opened this issue Nov 11, 2023 · 1 comment
Open

Dockerfile issue with --install-option=\"--prefix=/install\" #220

aous72 opened this issue Nov 11, 2023 · 1 comment

Comments

@aous72
Copy link

aous72 commented Nov 11, 2023

In using Dockerfile, when I issue
Docker build . --file ./Dockerfile -t jpylyzer

I get

 => ERROR [builder 5/5] RUN mkdir /install && cd /src/jpylyzer && pip install -U pip && pip install --install-opt  4.2s
------
 > [builder 5/5] RUN mkdir /install && cd /src/jpylyzer && pip install -U pip && pip install --install-option="--prefix=/install" .:
1.764 Requirement already satisfied: pip in /usr/local/lib/python3.6/site-packages (21.2.4)
1.955 Collecting pip
1.998   Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)
2.123 Installing collected packages: pip
2.123   Attempting uninstall: pip
2.124     Found existing installation: pip 21.2.4
2.247     Uninstalling pip-21.2.4:
2.405       Successfully uninstalled pip-21.2.4
3.315 Successfully installed pip-21.3.1
3.315 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
3.922 /usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py:245: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
3.922   cmdoptions.check_install_build_global(options)
3.922 ERROR: Location-changing options found in --install-option: ['--prefix'] from command line. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.
------
Dockerfile:11
--------------------
   9 |     WORKDIR /src
  10 |     RUN git clone https://github.com/openpreserve/jpylyzer.git
  11 | >>> RUN mkdir /install && cd /src/jpylyzer && pip install -U pip && pip install --install-option="--prefix=/install" .
  12 |
  13 |     FROM python:3.6-alpine
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir /install && cd /src/jpylyzer && pip install -U pip && pip install --install-option=\"--prefix=/install\" ." did not complete successfully: exit code: 1

I fixed this by modifying the Dockerfile line
RUN mkdir /install && cd /src/jpylyzer && pip install -U pip && pip install --install-option="--prefix=/install" .
to
RUN mkdir /install && cd /src/jpylyzer && pip install -U pip && pip install --prefix=/install .

I am actually not familiar with this. Perhaps you have a better solution.

Hope this is useful. Thank you.
Aous.

@bitsgalore
Copy link
Member

bitsgalore commented Nov 13, 2023

@aous72 thanks for reporting this! Tbh I'm not even completely sure why this particular Docker file is even included. All dockerization stuff was created by @carlwilson to make the packaging platform-independent, but from what I can see this Docker file isn't even used in any of the package builds. I'll try to have another look after my holidays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants