Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

solved Re: problems using camptocamp/docker-odoo-project

by
redCOR AG, Robert Rottermann
- 31/12/2016 08:45:02
in the ent it was a misunderstanding of my part.
I assumed, that the provided intstall.py was there to install odoo, but it is to install additional elements (like that ant stuff ..)
robert

On 30.12.2016 12:59, robert rottermann wrote:
<blockquote cite="mid:f52da88f-bf05-ec09-0af5-ed6a1790510b@redcor.ch" type="cite">

Hi there,

I try to understand the usage of camptocamp/docker-odoo-project.

So I created a structure according to the sample given at:
https://github.com/camptocamp/docker-odoo-project/tree/master/example

but somehow I have problems with the file structure.

When I setup things like suggested:
mkdir -p odoo/external-src odoo/local-src odoo/data odoo/features
git submodule init
git submodule add -b 9.0 https://github.com/odoo/odoo.git  odoo/src

then I add the minimal Dockerfile as suggested with the following content:

FROM camptocamp/odoo-project:9.0
MAINTAINER <name>

ENV ADDONS_PATH=/opt/odoo/local-src,/opt/odoo/external-src/server-tools,/opt/odoo/src/addons


And start the build:
docker build .

However I get problems as soon as docker starts to run the ONBUILD steps
 defined in the  parent Dockerfile:
# intermediate images should help speed up builds when only local-src, or only
# external-src changes
ONBUILD COPY ./src /opt/odoo/src
ONBUILD COPY ./external-src /opt/odoo/external-src
ONBUILD COPY ./local-src /opt/odoo/local-src
ONBUILD COPY ./data /opt/odoo/data
ONBUILD COPY ./songs /opt/odoo/songs
ONBUILD COPY ./setup.py /opt/odoo/
ONBUILD COPY ./VERSION /opt/odoo/
ONBUILD COPY ./migration.yml /opt/odoo/
# need to be called at the end, because it installs . and src
ONBUILD RUN cd /opt/odoo && pip install -r src_requirements.txt

None of the above documents exist. Either they are missing at all, or like ./src it is in odoo/src.
So I move the Dockerfile to the folder odoo, add all the missing files, and start to build the image again.

This time it runs much further.
Only in the very last step:
# need to be called at the end, because it installs . and src
ONBUILD RUN cd /opt/odoo && pip install -r src_requirements.txt

the process fails because the install scripts expects requirements.txt to be in /opt/odoo/odoo
Step 1 : RUN cd /opt/odoo && pip install -r src_requirements.txt
 ---> Running in 82f92d70e180
Obtaining file:///opt/odoo (from -r src_requirements.txt (line 7))
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/opt/odoo/setup.py", line 11, in <module>
        execfile(join(dirname(__file__), 'odoo', 'release.py'))  # Load release variables
    IOError: [Errno 2] No such file or directory: '/opt/odoo/odoo/release.py'
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /opt/odoo/
The command '/bin/sh -c cd /opt/odoo && pip install -r src_requirements.txt' returned a non-zero code: 1

So how do I have to setup things?

thanks very much for your pointers

robert

thanks very much for all your work
and happy new year!


Reference