You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting permission problems when trying to use 16's image as base for my own image. pip is complaining about not enough permissions in /odoo/src directory to create the egg.info or something like that. I'm thinking the root cause could be connected to the volume definition. The errors arise when trying to build with build-arg UID=1000.
# syntax = docker/dockerfile:1.2
FROM ghcr.io/camptocamp/odoo-project:16.0-5.0.5
COPY ./src /odoo/src
COPY ./VERSION /odoo/
COPY ./setup.py /odoo/
COPY ./requirements.txt /odoo/
RUN pip3 install -e /odoo
RUN pip3 install -e /odoo/src
# Project's specifics packages
ARG CACHEBUST
RUN cd /odoo && pip3 install -r requirements.txt
ENV ADDONS_PATH=/odoo/local-src,/odoo/external-src/enterprise,/odoo/external-src/custom
Installing collected packages: odoo
#0 1.858 Running setup.py develop for odoo
#0 2.389 error: subprocess-exited-with-error
#0 2.389
#0 2.389 × python setup.py develop did not run successfully.
#0 2.389 │ exit code: 1
#0 2.389 ╰─> [4 lines of output]
#0 2.389 running develop
#0 2.389 running egg_info
#0 2.389 creating odoo.egg-info
#0 2.389 error: could not create 'odoo.egg-info': Permission denied
#0 2.389 [end of output]
#0 2.389
#0 2.389 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 2.402 error: subprocess-exited-with-error
#0 2.402
#0 2.402 × python setup.py develop did not run successfully.
#0 2.402 │ exit code: 1
#0 2.402 ╰─> [4 lines of output]
#0 2.402 running develop
#0 2.402 running egg_info
#0 2.402 creating odoo.egg-info
#0 2.402 error: could not create 'odoo.egg-info': Permission denied
#0 2.402 [end of output]
#0 2.402
#0 2.402 note: This error originates from a subprocess, and is likely not a problem with pip.
------
failed to solve: process "/bin/sh -c pip3 install -e /odoo/src" did not complete successfully: exit code: 1
The text was updated successfully, but these errors were encountered:
At least the volume definition isn't the root cause. I rebuilt the image changing volume from /data/odoo to /odoo/data same result. But it seems like building process ignores custom UID no matters what.
Running with: docker compose build --no-cache --build-arg UID=$(id -u) --progress plain odoo
With a layer: RUN echo $(id)
Shows:
It seems the permission problem is because my UID=1000 but odoo inside the build despite the build-arg still 999.
I would like to point at this doesn't happen with 15.0 image.
UPDATE: I believe the volume definition is an issue but the UID problem is not. I have finally understood it is camptocamp image that accepts UID as a build arg, I was passing UID as a build arg for my own image. Still, I'm letting this open so anyone could clarify the volume definition problem.
Here we can see volume data is set to:
docker-odoo-project/16.0/Dockerfile
Line 63 in 0861fcd
As for the rest wherever we see data directory for odoo settings we see:
docker-odoo-project/16.0/Dockerfile
Line 58 in 0861fcd
docker-odoo-project/16.0/Dockerfile
Line 80 in 0861fcd
I am getting permission problems when trying to use 16's image as base for my own image. pip is complaining about not enough permissions in /odoo/src directory to create the egg.info or something like that. I'm thinking the root cause could be connected to the volume definition. The errors arise when trying to build with build-arg UID=1000.
So volume should be /data/odoo or /odoo/data????
The text was updated successfully, but these errors were encountered: