Contributors mailing list archives

contributors@odoo-community.org

Re: problems using camptocamp/docker-odoo-project

by
redCOR AG, Robert Rottermann
- 04/01/2017 15:50:41


Thanks Yannik,
On 03.01.2017 16:38, Yannick Vaucher wrote:
<blockquote cite="mid:CAA50gnEBoRUVfTqXShvM7dodawHPS6e+9AKwE51HGVy5+r4PYw@mail.gmail.com" type="cite">
Hello Robert,

Each time a ONBUILD COPY command is there the mentionned directory or file must exists.

About your error, I think that your issue is that your odoo/src is empty.
I have finally understood the way the docker is constructed.
What I have not yet grasped is the migrate workflow


<blockquote cite="mid:CAA50gnEBoRUVfTqXShvM7dodawHPS6e+9AKwE51HGVy5+r4PYw@mail.gmail.com" type="cite">

[...]

Before you did
git submodule init
did you do a git init to create your local repository?

Also you could try to use docker compose.

docker-compose odoo build

instead of `docker build .`




Regards and happy new year,

Yannick Vaucher
thanks a lot
and joyful new year for you also
robert

<blockquote cite="mid:CAA50gnEBoRUVfTqXShvM7dodawHPS6e+9AKwE51HGVy5+r4PYw@mail.gmail.com" type="cite">
Business Solutions Software Developer

Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 30
Office: +41 21 619 10 10

On 30 December 2016 at 13:08, robert rottermann <robert@redcor.ch> wrote:

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!

_______________________________________________ Mailing-List: http://odoo-community.org/groups/contributors-15 Post to: mailto:contributors@odoo-community.org Unsubscribe: http://odoo-community.org/groups?unsubscribe

_______________________________________________ Mailing-List: http://odoo-community.org/groups/contributors-15 Post to: mailto:contributors@odoo-community.org Unsubscribe: http://odoo-community.org/groups?unsubscribe