Tecnativa / doodba

Base image for making the creation of customized Odoo environments a piece of cake
Apache License 2.0
430 stars 304 forks source link

Possible error with tecnativa/odoo-base:10 #79

Closed joserprieto closed 7 years ago

joserprieto commented 7 years ago

I cloned the repo, branch scaffolding, as in the "quick guide":

git clone -b scaffolding https://github.com/Tecnativa/docker-odoo-base.git ocb-and-all-oca-repos
Clonar en «ocb-and-all-oca-repos»...
remote: Counting objects: 1356, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 1356 (delta 6), reused 19 (delta 4), pack-reused 1325
Receiving objects: 100% (1356/1356), 241.72 KiB | 0 bytes/s, done.
Resolving deltas: 100% (810/810), done.
Comprobando la conectividad… hecho.
$ cd ocb-and-all-oca-repos
$ ln -s devel.yaml docker-compose.yml
$ docker-compose build --pull
smtp uses an image, skipping
wdb uses an image, skipping
db uses an image, skipping
inbox uses an image, skipping
Building odoo
Step 1/1 : FROM tecnativa/odoo-base:10.0
10.0: Pulling from tecnativa/odoo-base
aa18ad1a0d33: Pull complete
83c2ca70d25d: Pull complete
767589c3ae5b: Pull complete
45f917242ff7: Pull complete
ec382c11036e: Pull complete
1590cc52bced: Pull complete
c833f2693ef1: Pull complete
ed81f87eb8fa: Pull complete
9ad0a7c006d3: Pull complete
bb76283ff010: Pull complete
3b12f1092ab9: Pull complete
f3be112150a1: Pull complete
fa2369f48020: Pull complete
44d442c24251: Pull complete
0fd9ea64ab24: Pull complete
f857b4b3f64b: Pull complete
c8fdda65ddd7: Pull complete
Digest: sha256:586a33b2842b73f7ef348c4e9c3c1d9b504e44ebc7d065dceda420c0d696087f
Status: Downloaded newer image for tecnativa/odoo-base:10.0
# Executing 26 build triggers...
Step 1/1 : ENTRYPOINT /opt/odoo/common/entrypoint
 ---> Running in 90fcf07dabba
Step 1/1 : CMD /usr/local/bin/odoo
 ---> Running in 7ff4f08c3d3e
Step 1/1 : ARG AGGREGATE=true
 ---> Running in cc4161d18caa
Step 1/1 : ARG DEPTH_DEFAULT=1
 ---> Running in 0f3f1b149aa2
Step 1/1 : ARG DEPTH_MERGE=100
 ---> Running in 8b25dbdbbaaf
Step 1/1 : ARG CLEAN=true
 ---> Running in d06ea2ee17d0
Step 1/1 : ARG COMPILE=true
 ---> Running in 2439778b5127
Step 1/1 : ARG CONFIG_BUILD=true
 ---> Running in 956d427ee1a8
Step 1/1 : ARG PIP_INSTALL_ODOO=true
 ---> Running in 2de5f7a16037
Step 1/1 : ARG ADMIN_PASSWORD=admin
 ---> Running in 0424878f5121
Step 1/1 : ARG SMTP_SERVER=smtp
 ---> Running in 0a479a334720
Step 1/1 : ARG PROXY_MODE=false
 ---> Running in b07bef938888
Step 1/1 : ARG WITHOUT_DEMO=all
 ---> Running in 03c90e44487e
Step 1/1 : ARG PYTHONOPTIMIZE=1
 ---> Running in 3568f33a579d
Step 1/1 : ENV PYTHONOPTIMIZE "$PYTHONOPTIMIZE"
 ---> Running in 0cefe4380063
Step 1/1 : ARG PGUSER=odoo
 ---> Running in 93d89b188d60
Step 1/1 : ARG PGPASSWORD=odoopassword
 ---> Running in 435b9a5eb1f1
Step 1/1 : ARG PGHOST=db
 ---> Running in f2a95e9af646
Step 1/1 : ARG PGDATABASE=prod
 ---> Running in adc083da721c
Step 1/1 : ENV ADMIN_PASSWORD "$ADMIN_PASSWORD" UNACCENT "$UNACCENT" PGUSER "$PGUSER" PGPASSWORD "$PGPASSWORD" PGHOST "$PGHOST" PGDATABASE "$PGDATABASE" PROXY_MODE "$PROXY_MODE" SMTP_SERVER "$SMTP_SERVER" WITHOUT_DEMO "$WITHOUT_DEMO"
 ---> Running in 7c5e92f4a362
Step 1/1 : ARG LOCAL_CUSTOM_DIR=./custom
 ---> Running in 238cd27f62d0
Step 1/1 : COPY $LOCAL_CUSTOM_DIR /opt/odoo/custom
Step 1/1 : ARG LOG_LEVEL=INFO
 ---> Running in f8dfad9c826a
Step 1/1 : RUN mkdir -p /opt/odoo/custom/ssh             && ln -s /opt/odoo/custom/ssh ~root/.ssh             && chmod -R u=rwX,go= /opt/odoo/custom/ssh             && sync
 ---> Running in 8f6ccd840852
Step 1/1 : RUN /opt/odoo/common/build
 ---> Running in 7cfb70f47382
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/npm.txt
INFO:docker-odoo-base:Executing: ['pip', 'install', '--upgrade', '--no-cache-dir', '-r', '/opt/odoo/custom/dependencies/pip.txt']
Collecting checksumdir (from -r /opt/odoo/custom/dependencies/pip.txt (line 1))
  Downloading checksumdir-1.1.4.tar.gz
Collecting unicodecsv (from -r /opt/odoo/custom/dependencies/pip.txt (line 2))
  Downloading unicodecsv-0.14.1.tar.gz
Collecting unidecode (from -r /opt/odoo/custom/dependencies/pip.txt (line 3))
  Downloading Unidecode-0.04.21-py2.py3-none-any.whl (228kB)
Collecting requests (from -r /opt/odoo/custom/dependencies/pip.txt (line 4))
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
Collecting xlsxwriter (from -r /opt/odoo/custom/dependencies/pip.txt (line 5))
  Downloading XlsxWriter-1.0.0-py2.py3-none-any.whl (139kB)
Requirement already up-to-date: idna<2.7,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Installing collected packages: checksumdir, unicodecsv, unidecode, requests, xlsxwriter
  Running setup.py install for checksumdir: started
    Running setup.py install for checksumdir: finished with status 'done'
  Running setup.py install for unicodecsv: started
    Running setup.py install for unicodecsv: finished with status 'done'
  Found existing installation: requests 2.11.1
    Uninstalling requests-2.11.1:
      Successfully uninstalled requests-2.11.1
  Found existing installation: XlsxWriter 0.9.3
    Uninstalling XlsxWriter-0.9.3:
      Successfully uninstalled XlsxWriter-0.9.3
Successfully installed checksumdir-1.1.4 requests-2.18.4 unicodecsv-0.14.1 unidecode-0.4.21 xlsxwriter-1.0.0
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/gem.txt
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/apt.txt
WARNING:docker-odoo-base:Not aggregating code repositories
WARNING:docker-odoo-base:Not cleaning garbage
WARNING:docker-odoo-base:Not compiling Python code
WARNING:docker-odoo-base:Skipping Odoo config generation - will perform during entrypoint.
INFO:docker-odoo-base:Installing Odoo from /opt/odoo/custom/src/odoo
WARNING:docker-odoo-base:Blindly symlinking odoo executable
INFO:docker-odoo-base:No removable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:Executing: rm -Rf ~/.npm /tmp/*
INFO:docker-odoo-base:Executing: rm -Rf ~/.gem /var/lib/gems/*/cache/
Traceback (most recent call last):
  File "/opt/odoo/common/build", line 26, in <module>
    subprocess.check_call(command)
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
ERROR: Service 'odoo' failed to build: The command '/opt/odoo/common/build' returned a non-zero code: 1

OS, Docker and docker-compose versions:

$ lsb_release --all
LSB Version:    core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: LinuxMint
Description:    Linux Mint 18.1 Serena
Release:    18.1
Codename:   serena
$ docker --version
Docker version 17.05.0-ce, build 89658be
$ docker-compose --version
docker-compose version 1.11.1, build 7c5d5e4
yajo commented 7 years ago

Sorry, I just did the same steps and it seems to work here:

➤ git clone -b scaffolding https://github.com/Tecnativa/docker-odoo-base.git ocb-and-all-oca-repos
Cloning into 'ocb-and-all-oca-repos'...
remote: Counting objects: 1356, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 1356 (delta 6), reused 19 (delta 4), pack-reused 1325
Receiving objects: 100% (1356/1356), 241.72 KiB | 364.00 KiB/s, done.
Resolving deltas: 100% (810/810), done.

➤ cd ocb-and-all-oca-repos/

➤ ln -s devel.yaml docker-compose.yml

➤ docker-compose build --pull
db uses an image, skipping
inbox uses an image, skipping
smtp uses an image, skipping
wdb uses an image, skipping
Building odoo
Step 1/1 : FROM tecnativa/odoo-base:10.0
10.0: Pulling from tecnativa/odoo-base
aa18ad1a0d33: Already exists
83c2ca70d25d: Already exists
767589c3ae5b: Already exists
45f917242ff7: Already exists
ec382c11036e: Already exists
1590cc52bced: Already exists
c833f2693ef1: Already exists
ed81f87eb8fa: Already exists
9ad0a7c006d3: Already exists
bb76283ff010: Already exists
3b12f1092ab9: Already exists
f3be112150a1: Already exists
fa2369f48020: Already exists
44d442c24251: Already exists
0fd9ea64ab24: Already exists
f857b4b3f64b: Already exists
c8fdda65ddd7: Pull complete
Digest: sha256:586a33b2842b73f7ef348c4e9c3c1d9b504e44ebc7d065dceda420c0d696087f
Status: Downloaded newer image for tecnativa/odoo-base:10.0
# Executing 26 build triggers...
Step 1/1 : ENTRYPOINT /opt/odoo/common/entrypoint
 ---> Running in b672f1b99630
Step 1/1 : CMD /usr/local/bin/odoo
 ---> Running in 818ceb63ec3f
Step 1/1 : ARG AGGREGATE=true
 ---> Running in 85e5a447f29d
Step 1/1 : ARG DEPTH_DEFAULT=1
 ---> Running in 76b595c9e5a3
Step 1/1 : ARG DEPTH_MERGE=100
 ---> Running in 514aea221453
Step 1/1 : ARG CLEAN=true
 ---> Running in 0865d97f16a9
Step 1/1 : ARG COMPILE=true
 ---> Running in d0e5e4018931
Step 1/1 : ARG CONFIG_BUILD=true
 ---> Running in 29edaafa259e
Step 1/1 : ARG PIP_INSTALL_ODOO=true
 ---> Running in 1f2365103031
Step 1/1 : ARG ADMIN_PASSWORD=admin
 ---> Running in e61ab89d0f72
Step 1/1 : ARG SMTP_SERVER=smtp
 ---> Running in b9f2ee4c16f1
Step 1/1 : ARG PROXY_MODE=false
 ---> Running in d5c16cfd485b
Step 1/1 : ARG WITHOUT_DEMO=all
 ---> Running in b0ea34c43758
Step 1/1 : ARG PYTHONOPTIMIZE=1
 ---> Running in 10a2ccd701d3
Step 1/1 : ENV PYTHONOPTIMIZE "$PYTHONOPTIMIZE"
 ---> Running in 6d9143aa4b06
Step 1/1 : ARG PGUSER=odoo
 ---> Running in 5e5dd8ed0086
Step 1/1 : ARG PGPASSWORD=odoopassword
 ---> Running in b1a42207ee91
Step 1/1 : ARG PGHOST=db
 ---> Running in ea9d730e8fee
Step 1/1 : ARG PGDATABASE=prod
 ---> Running in 5cfb950300d3
Step 1/1 : ENV ADMIN_PASSWORD "$ADMIN_PASSWORD" UNACCENT "$UNACCENT" PGUSER "$PGUSER" PGPASSWORD "$PGPASSWORD" PGHOST "$PGHOST" PGDATABASE "$PGDATABASE" PROXY_MODE "$PROXY_MODE" SMTP_SERVER "$SMTP_SERVER" WITHOUT_DEMO "$WITHOUT_DEMO"
 ---> Running in 8b4c24383637
Step 1/1 : ARG LOCAL_CUSTOM_DIR=./custom
 ---> Running in 19626e2047e4
Step 1/1 : COPY $LOCAL_CUSTOM_DIR /opt/odoo/custom
Step 1/1 : ARG LOG_LEVEL=INFO
 ---> Running in b76a66dd1a1d
Step 1/1 : RUN mkdir -p /opt/odoo/custom/ssh             && ln -s /opt/odoo/custom/ssh ~root/.ssh             && chmod -R u=rwX,go= /opt/odoo/custom/ssh             && sync
 ---> Running in 50c8772e6c28
Step 1/1 : RUN /opt/odoo/common/build
 ---> Running in 2321461025f9
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/npm.txt
INFO:docker-odoo-base:Executing: ['pip', 'install', '--upgrade', '--no-cache-dir', '-r', '/opt/odoo/custom/dependencies/pip.txt']
Collecting checksumdir (from -r /opt/odoo/custom/dependencies/pip.txt (line 1))
  Downloading checksumdir-1.1.4.tar.gz
Collecting unicodecsv (from -r /opt/odoo/custom/dependencies/pip.txt (line 2))
  Downloading unicodecsv-0.14.1.tar.gz
Collecting unidecode (from -r /opt/odoo/custom/dependencies/pip.txt (line 3))
  Downloading Unidecode-0.04.21-py2.py3-none-any.whl (228kB)
Collecting requests (from -r /opt/odoo/custom/dependencies/pip.txt (line 4))
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
Collecting xlsxwriter (from -r /opt/odoo/custom/dependencies/pip.txt (line 5))
  Downloading XlsxWriter-1.0.0-py2.py3-none-any.whl (139kB)
Requirement already up-to-date: idna<2.7,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Installing collected packages: checksumdir, unicodecsv, unidecode, requests, xlsxwriter
  Running setup.py install for checksumdir: started
    Running setup.py install for checksumdir: finished with status 'done'
  Running setup.py install for unicodecsv: started
    Running setup.py install for unicodecsv: finished with status 'done'
  Found existing installation: requests 2.11.1
    Uninstalling requests-2.11.1:
      Successfully uninstalled requests-2.11.1
  Found existing installation: XlsxWriter 0.9.3
    Uninstalling XlsxWriter-0.9.3:
      Successfully uninstalled XlsxWriter-0.9.3
Successfully installed checksumdir-1.1.4 requests-2.18.4 unicodecsv-0.14.1 unidecode-0.4.21 xlsxwriter-1.0.0
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/gem.txt
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/apt.txt
WARNING:docker-odoo-base:Not aggregating code repositories
WARNING:docker-odoo-base:Not cleaning garbage
WARNING:docker-odoo-base:Not compiling Python code
WARNING:docker-odoo-base:Skipping Odoo config generation - will perform during entrypoint.
INFO:docker-odoo-base:Installing Odoo from /opt/odoo/custom/src/odoo
WARNING:docker-odoo-base:Blindly symlinking odoo executable
INFO:docker-odoo-base:No removable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:Executing: rm -Rf ~/.npm /tmp/*
INFO:docker-odoo-base:Executing: rm -Rf ~/.gem /var/lib/gems/*/cache/
Step 1/1 : USER odoo
 ---> Running in bb23e187b321
 ---> 2b29d71f75e9
Removing intermediate container 10a2ccd701d3
Removing intermediate container b672f1b99630
Removing intermediate container 818ceb63ec3f
Removing intermediate container 85e5a447f29d
Removing intermediate container 0865d97f16a9
Removing intermediate container 29edaafa259e
Removing intermediate container 1f2365103031
Removing intermediate container d5c16cfd485b
Removing intermediate container 5e5dd8ed0086
Removing intermediate container d0e5e4018931
Removing intermediate container e61ab89d0f72
Removing intermediate container b9f2ee4c16f1
Removing intermediate container b0ea34c43758
Removing intermediate container 5cfb950300d3
Removing intermediate container 8b4c24383637
Removing intermediate container 514aea221453
Removing intermediate container 6d9143aa4b06
Removing intermediate container ea9d730e8fee
Removing intermediate container 19626e2047e4
Removing intermediate container b76a66dd1a1d
Removing intermediate container 50c8772e6c28
Removing intermediate container 76b595c9e5a3
Removing intermediate container b1a42207ee91
Removing intermediate container 2321461025f9
Removing intermediate container bb23e187b321
Successfully built 2b29d71f75e9
Successfully tagged ocbandallocarepos_odoo:latest

So it seems to be somehow related to your environment. Did you add any build.d scripts and forgot to add the shebang or the chmod +x to it?

Closing, please reopen if you can provide better steps to reproduce. Thanks!

joserprieto commented 7 years ago

I try to give you more data.

First, my containers, images, and volume datas:

$ rm -rf ocb-and-all-oca-repos/
joserprieto@Asimov ~/Data/Projects/JRP/DCK/src/Tests/odoo/Tecnativa/custom-builds $ docker ps -a
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                      PORTS                NAMES
a2d1b0aeed46        portainer/templates       "nginx -g 'daemon ..."   18 minutes ago      Up 18 minutes               80/tcp, 443/tcp      portainer-templates
c07278ed07be        portainer/portainer       "/portainer --temp..."   18 minutes ago      Up 18 minutes               9000/tcp             portainer-app
afe2c61254cf        v2tec/watchtower          "/watchtower --cle..."   18 minutes ago      Up 18 minutes                                    portainer-watchtower
b46a38ccb4b6        portainer_proxy           "nginx -g 'daemon ..."   18 minutes ago      Up 18 minutes               0.0.0.0:80->80/tcp   portainer-proxy
c46eb7b12779        phplist/phplist:latest    "docker-entrypoint.sh"   20 hours ago        Exited (137) 16 hours ago                        phplist-app
e2f20639f860        mysql:5.7                 "docker-entrypoint..."   20 hours ago        Exited (0) 16 hours ago                          phplist-db-mysql
f0acc66bca59        mautic/mautic             "/entrypoint.sh ap..."   23 hours ago        Exited (0) 16 hours ago                          mautic_app
bec6f6e08574        mysql:5.7                 "docker-entrypoint..."   23 hours ago        Exited (0) 16 hours ago                          mautic_db_mysql
8170d71fdac2        ezka77/xen-orchestra-ce   "/xo-entry.sh yarn..."   23 hours ago        Exited (137) 16 hours ago                        xoa
c20f7dbf0fe5        redis:alpine              "docker-entrypoint..."   23 hours ago        Exited (0) 16 hours ago                          xoa-redis
8334da2fb11d        wordpress                 "docker-entrypoint..."   23 hours ago        Exited (0) 23 hours ago                          wordpress_ivf_mep
ab3a9c66f7f3        mysql:5.7                 "docker-entrypoint..."   23 hours ago        Exited (0) 23 hours ago                          mysql_ivf_mep
cb32096b5eba        prestashop/prestashop     "docker-php-entryp..."   12 days ago         Exited (0) 12 days ago                           some-prestashop
6465a77803d5        mysql                     "docker-entrypoint..."   12 days ago         Exited (0) 12 days ago                           some-mysql
$ docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
portainer_proxy           latest              2f5af8e45955        24 hours ago        15.5MB
mautic/mautic             latest              480573125a27        5 days ago          612MB
nginx                     alpine              21a2450d623e        6 days ago          15.5MB
prestashop/prestashop     latest              7c52afa327a5        2 weeks ago         868MB
ezka77/xen-orchestra-ce   latest              6ad46a066b11        2 weeks ago         472MB
portainer/portainer       latest              47dbf4321bb4        5 weeks ago         10.7MB
wordpress                 latest              c4260b289fc7        6 weeks ago         406MB
redis                     alpine              9d8fa9aa0e5b        8 weeks ago         27.5MB
v2tec/watchtower          latest              19d1aeeabd1c        2 months ago        8.26MB
phplist/phplist           latest              932aad69163f        3 months ago        345MB
portainer/templates       latest              0f30e1b1ff25        4 months ago        54.1MB
mysql                     latest              d5127813070b        5 months ago        407MB
mysql                     5.7                 cd88b71c6c8c        10 months ago       383MB
$ docker volume ls
DRIVER              VOLUME NAME
local               0f2834450157cb626e6ae088feb222529addec3f9a90084cbd5951f927e0e950
local               100_pgdata
local               1bb23975f98fb164effe13d86d3e9f35786a65520035155b3cff2ba0c1b47346
local               2f9b27aa909d91510971d9139fa2ff2f9779a2c87358501347931b9f1c1a057c
local               74f8369682462a5c3555212883ad4d405e713e87b0fabf1880c0d26d5adc5753
local               95aaf45aa268607d7e17156172ded62ddc816bb7e40f63101cd8be0f78396501
local               mep_mysqldata

All volumes are in use; screenshot from Portainer running on local docker:

image

The unused pgdata is a volume for postgres with the official odoo docker.

Now, i clone the repo:

$ git clone -b scaffolding https://github.com/Tecnativa/docker-odoo-base.git ocb-and-all-oca-repos
Clonar en «ocb-and-all-oca-repos»...
remote: Counting objects: 1356, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 1356 (delta 6), reused 19 (delta 4), pack-reused 1325
Receiving objects: 100% (1356/1356), 241.72 KiB | 359.00 KiB/s, done.
Resolving deltas: 100% (810/810), done.
Comprobando la conectividad… hecho.

Cd into repo and make symlink:

$ cd ocb-and-all-oca-repos/
$ ln -s devel.yaml docker-compose.yml

Contents of the repo:

 $ tree -L 5
.
├── common.yaml
├── devel.yaml
├── docker-compose.yml -> devel.yaml
├── LICENSE
├── odoo
│   ├── auto
│   │   └── addons
│   ├── custom
│   │   ├── build.d
│   │   ├── conf.d
│   │   ├── dependencies
│   │   │   ├── apt_build.txt
│   │   │   ├── apt.txt
│   │   │   ├── gem.txt
│   │   │   ├── npm.txt
│   │   │   └── pip.txt
│   │   ├── entrypoint.d
│   │   ├── src
│   │   │   ├── addons.yaml
│   │   │   ├── private
│   │   │   └── repos.yaml
│   │   └── ssh
│   │       ├── config
│   │       ├── id_rsa
│   │       ├── id_rsa.pub
│   │       └── known_hosts
│   └── Dockerfile
├── prod.yaml
├── README.md
├── setup-devel.yaml
├── src -> ./odoo/custom/src/
└── test.yaml

12 directories, 20 files

Now, the build:

$ docker-compose build --pull
smtp uses an image, skipping
wdb uses an image, skipping
db uses an image, skipping
inbox uses an image, skipping
Building odoo
Step 1/1 : FROM tecnativa/odoo-base:10.0
10.0: Pulling from tecnativa/odoo-base
aa18ad1a0d33: Already exists
83c2ca70d25d: Pull complete
767589c3ae5b: Pull complete
45f917242ff7: Pull complete
ec382c11036e: Pull complete
1590cc52bced: Pull complete
c833f2693ef1: Pull complete
ed81f87eb8fa: Pull complete
9ad0a7c006d3: Pull complete
bb76283ff010: Pull complete
3b12f1092ab9: Pull complete
f3be112150a1: Pull complete
fa2369f48020: Pull complete
44d442c24251: Pull complete
0fd9ea64ab24: Pull complete
f857b4b3f64b: Pull complete
c8fdda65ddd7: Pull complete
Digest: sha256:586a33b2842b73f7ef348c4e9c3c1d9b504e44ebc7d065dceda420c0d696087f
Status: Downloaded newer image for tecnativa/odoo-base:10.0
# Executing 26 build triggers...
Step 1/1 : ENTRYPOINT /opt/odoo/common/entrypoint
 ---> Running in 7db1987665c4
Step 1/1 : CMD /usr/local/bin/odoo
 ---> Running in 76a11980b87b
Step 1/1 : ARG AGGREGATE=true
 ---> Running in 0f3932b6295c
Step 1/1 : ARG DEPTH_DEFAULT=1
 ---> Running in 46189e28cda3
Step 1/1 : ARG DEPTH_MERGE=100
 ---> Running in c59161707b57
Step 1/1 : ARG CLEAN=true
 ---> Running in 1c967f713d77
Step 1/1 : ARG COMPILE=true
 ---> Running in 3bac23ee56f6
Step 1/1 : ARG CONFIG_BUILD=true
 ---> Running in 60253ca9bb72
Step 1/1 : ARG PIP_INSTALL_ODOO=true
 ---> Running in fd3a0eca0f1c
Step 1/1 : ARG ADMIN_PASSWORD=admin
 ---> Running in 8cd01ee9dc30
Step 1/1 : ARG SMTP_SERVER=smtp
 ---> Running in 9454423c0376
Step 1/1 : ARG PROXY_MODE=false
 ---> Running in 4a128219699c
Step 1/1 : ARG WITHOUT_DEMO=all
 ---> Running in 4b93071ae9ca
Step 1/1 : ARG PYTHONOPTIMIZE=1
 ---> Running in d7427b1c07ee
Step 1/1 : ENV PYTHONOPTIMIZE "$PYTHONOPTIMIZE"
 ---> Running in 64c0bd8f9233
Step 1/1 : ARG PGUSER=odoo
 ---> Running in c300a9d84520
Step 1/1 : ARG PGPASSWORD=odoopassword
 ---> Running in ffd553de502f
Step 1/1 : ARG PGHOST=db
 ---> Running in 2f1004ea4a91
Step 1/1 : ARG PGDATABASE=prod
 ---> Running in ebf59179350e
Step 1/1 : ENV ADMIN_PASSWORD "$ADMIN_PASSWORD" UNACCENT "$UNACCENT" PGUSER "$PGUSER" PGPASSWORD "$PGPASSWORD" PGHOST "$PGHOST" PGDATABASE "$PGDATABASE" PROXY_MODE "$PROXY_MODE" SMTP_SERVER "$SMTP_SERVER" WITHOUT_DEMO "$WITHOUT_DEMO"
 ---> Running in 31a6c8145c72
Step 1/1 : ARG LOCAL_CUSTOM_DIR=./custom
 ---> Running in 3c47308b3a4c
Step 1/1 : COPY $LOCAL_CUSTOM_DIR /opt/odoo/custom
Step 1/1 : ARG LOG_LEVEL=INFO
 ---> Running in 7843dbd5ec13
Step 1/1 : RUN mkdir -p /opt/odoo/custom/ssh             && ln -s /opt/odoo/custom/ssh ~root/.ssh             && chmod -R u=rwX,go= /opt/odoo/custom/ssh             && sync
 ---> Running in 8ad41a5cc3df
Step 1/1 : RUN /opt/odoo/common/build
 ---> Running in 64febfdb01a0
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/npm.txt
INFO:docker-odoo-base:Executing: ['pip', 'install', '--upgrade', '--no-cache-dir', '-r', '/opt/odoo/custom/dependencies/pip.txt']
Collecting checksumdir (from -r /opt/odoo/custom/dependencies/pip.txt (line 1))
  Downloading checksumdir-1.1.4.tar.gz
Collecting unicodecsv (from -r /opt/odoo/custom/dependencies/pip.txt (line 2))
  Downloading unicodecsv-0.14.1.tar.gz
Collecting unidecode (from -r /opt/odoo/custom/dependencies/pip.txt (line 3))
  Downloading Unidecode-0.04.21-py2.py3-none-any.whl (228kB)
Collecting requests (from -r /opt/odoo/custom/dependencies/pip.txt (line 4))
  Downloading requests-2.18.4-py2.py3-none-any.whl (88kB)
Collecting xlsxwriter (from -r /opt/odoo/custom/dependencies/pip.txt (line 5))
  Downloading XlsxWriter-1.0.0-py2.py3-none-any.whl (139kB)
Requirement already up-to-date: idna<2.7,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests->-r /opt/odoo/custom/dependencies/pip.txt (line 4))
Installing collected packages: checksumdir, unicodecsv, unidecode, requests, xlsxwriter
  Running setup.py install for checksumdir: started
    Running setup.py install for checksumdir: finished with status 'done'
  Running setup.py install for unicodecsv: started
    Running setup.py install for unicodecsv: finished with status 'done'
  Found existing installation: requests 2.11.1
    Uninstalling requests-2.11.1:
      Successfully uninstalled requests-2.11.1
  Found existing installation: XlsxWriter 0.9.3
    Uninstalling XlsxWriter-0.9.3:
      Successfully uninstalled XlsxWriter-0.9.3
Successfully installed checksumdir-1.1.4 requests-2.18.4 unicodecsv-0.14.1 unidecode-0.4.21 xlsxwriter-1.0.0
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/gem.txt
INFO:docker-odoo-base:No installable requirements found in /opt/odoo/custom/dependencies/apt.txt
WARNING:docker-odoo-base:Not aggregating code repositories
WARNING:docker-odoo-base:Not cleaning garbage
WARNING:docker-odoo-base:Not compiling Python code
WARNING:docker-odoo-base:Skipping Odoo config generation - will perform during entrypoint.
INFO:docker-odoo-base:Installing Odoo from /opt/odoo/custom/src/odoo
WARNING:docker-odoo-base:Blindly symlinking odoo executable
INFO:docker-odoo-base:No removable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:Executing: rm -Rf ~/.npm /tmp/*
INFO:docker-odoo-base:Executing: rm -Rf ~/.gem /var/lib/gems/*/cache/
Traceback (most recent call last):
  File "/opt/odoo/common/build", line 26, in <module>
    subprocess.check_call(command)
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
ERROR: Service 'odoo' failed to build: The command '/opt/odoo/common/build' returned a non-zero code: 1

I didn't add any build.d scripts, or nothing more...

The full path of the repo:

/home/joserprieto/Data/Projects/JRP/DCK/src/Tests/odoo/Tecnativa/custom-builds/ocb-and-all-oca-repos

Filesystem of the /home/joserprieto/Data partition:

/dev/sdb5 on /home/joserprieto/Data type fuseblk (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

/dev/sdb5 791152640 1600110591 808957952 385,8G 7 HPFS/NTFS/exFAT

Mount on /etc/fstab:

UUID=E6B486B8B4868B2F /home/joserprieto/Data ntfs-3g defaults,uid=1000,gid=1000 0 0

The /var/lib/docker is under /:

/dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)

yajo commented 7 years ago

Still I'm unable to reproduce 😕

joserprieto commented 7 years ago

Seeing the logs, my error was on:

(your log):

INFO:docker-odoo-base:Installing Odoo from /opt/odoo/custom/src/odoo
WARNING:docker-odoo-base:Blindly symlinking odoo executable
INFO:docker-odoo-base:No removable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:Executing: rm -Rf ~/.npm /tmp/*
INFO:docker-odoo-base:Executing: rm -Rf ~/.gem /var/lib/gems/*/cache/
Step 1/1 : USER odoo

(my log):

INFO:docker-odoo-base:Installing Odoo from /opt/odoo/custom/src/odoo
WARNING:docker-odoo-base:Blindly symlinking odoo executable
INFO:docker-odoo-base:No removable requirements found in /opt/odoo/custom/dependencies/apt_build.txt
INFO:docker-odoo-base:Executing: rm -Rf ~/.npm /tmp/*
INFO:docker-odoo-base:Executing: rm -Rf ~/.gem /var/lib/gems/*/cache/
Traceback (most recent call last):

If i'm not wrong, viewing the Dockerfile of the Tecnativa/odoo-base-docker, the error is on this point of the build:

ONBUILD RUN mkdir -p /opt/odoo/custom/ssh \ && ln -s /opt/odoo/custom/ssh ~root/.ssh \ && chmod -R u=rwX,go= /opt/odoo/custom/ssh \ && sync ONBUILD RUN ["/opt/odoo/common/build"] ONBUILD USER odoo

On the YAML files:

    odoo:
        extends:
            file: common.yaml
            service: odoo
        build:
            args:
                # To aggregate in development, use `setup-devel.yaml`
                AGGREGATE: "false"
                # No need for this in development
                PIP_INSTALL_ODOO: "false"
                CLEAN: "false"
                COMPILE: "false"
        environment:
            ADMIN_PASSWORD: admin
            PGDATABASE: devel
            PYTHONOPTIMIZE: ""
            # You want demo data for development
            WITHOUT_DEMO: "false"
        ports:
            - "127.0.0.1:${ODOO_MAJOR}069:8069"
            - "127.0.0.1:${ODOO_MAJOR}072:8072"
            - "127.0.0.1:6899:6899"
        volumes:
            - ./odoo/custom:/opt/odoo/custom:ro,z
            - ./odoo/auto/addons:/opt/odoo/auto/addons:rw,z
    odoo:
        build:
            context: ./odoo
            args:
                CONFIG_BUILD: "false"
        environment:
            ADMIN_PASSWORD: "$ODOO_ADMIN_PASSWORD"
            PGPASSWORD: "$DB_PASSWORD"
            PGUSER: "$DB_USER"
            PROXY_MODE: "$ODOO_PROXY_MODE"
            PYTHONOPTIMIZE: 2
        tty: true
        volumes:
            - filestore$ODOO_MAJOR:/var/lib/odoo:z

But i can't see what is the content of /opt/odoo/common/build :(

ONBUILD RUN ["/opt/odoo/common/build"]

yajo commented 7 years ago

Please try adding a build arg to odoo image: LOG_LEVEL=DEBUG

joserprieto commented 7 years ago

@Yajo, your OS, Docker version, docker-compose version?

I can try to reproduce your enviroment and test on it.

joserprieto commented 7 years ago

Ok, i try with the LOG_LEVEL=DEBUG first.

yajo commented 7 years ago

Just in case:

➤ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Fedora
Description:    Fedora release 26 (Twenty Six)
Release:    26
Codename:   TwentySix

➤ docker-compose --version
docker-compose version 1.15.0, build e12f3b9

➤ docker version
Client:
 Version:      17.07.0-ce
 API version:  1.31
 Go version:   go1.8.3
 Git commit:   8784753
 Built:        Tue Aug 29 17:47:17 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.07.0-ce
 API version:  1.31 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   8784753
 Built:        Tue Aug 29 17:48:41 2017
 OS/Arch:      linux/amd64
 Experimental: false

➤ docker info
Containers: 79
 Running: 4
 Paused: 0
 Stopped: 75
Images: 1042
Server Version: 17.07.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3addd840653146c90a254301d6c3a663c7fd6429
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
 selinux
Kernel Version: 4.12.11-300.fc26.x86_64
Operating System: Fedora 26 (Workstation Edition)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 6.758GiB
Name: yajolap.yajodomain
ID: KUBN:F7JL:URX6:HO55:R3L2:SCUU:IWVY:EZ2O:F53G:WHTO:3G4D:R4YU
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
joserprieto commented 7 years ago

I tried...

(Cloned repo again, make symlink, ..); Before the docker-compose build --pull, i modified my my docker-compose.yml (devel.yml):

        build:
            args:
                # To aggregate in development, use `setup-devel.yaml`
                AGGREGATE: "false"
                # No need for this in development
                PIP_INSTALL_ODOO: "false"
                CLEAN: "false"
                COMPILE: "false"
                LOG_LEVEL: "DEBUG"

And the same error:

INFO:docker-odoo-base:Executing: rm -Rf ~/.gem /var/lib/gems/*/cache/
Traceback (most recent call last):
  File "/opt/odoo/common/build", line 26, in <module>
    subprocess.check_call(command)
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error
ERROR: Service 'odoo' failed to build: The command '/opt/odoo/common/build' returned a non-zero code: 1
joserprieto commented 7 years ago

My complete enviroment:

$ lsb_release -a
LSB Version:    core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: LinuxMint
Description:    Linux Mint 18.1 Serena
Release:    18.1
Codename:   serena

$ docker-compose --version
docker-compose version 1.11.1, build 7c5d5e4

$ docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64
 Experimental: false

$ docker info
Containers: 39
 Running: 4
 Paused: 0
 Stopped: 35
Images: 39
Server Version: 17.05.0-ce
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 211
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-89-generic
Operating System: Linux Mint 18.1
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.539GiB
Name: Asimov
ID: SIKH:SJYU:V4Y2:PEKO:UAK6:4AKI:HLWS:BVSU:5KQO:FYEI:4E7M:TIFM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: joserprieto
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
yajo commented 7 years ago

I just merged #81 to help diagnose your problem. When the current Docker build ends, please repeat your build with LOG_LEVEL=DEBUG and let's see if we nail it down.

joserprieto commented 7 years ago

Many thanks, Yajo.

I test it as quickly as i can.

Balazs23 commented 7 years ago

Hi!

I had the same problem, using the LOG_LEVEL=DEBUG:

INFO:docker-odoo-base:Executing: rm -Rf ~/.npm /tmp/*
INFO:docker-odoo-base:Executing: rm -Rf ~/.gem /var/lib/gems/*/cache/
DEBUG:docker-odoo-base:Executing /opt/odoo/custom/build.d/.empty
Traceback (most recent call last):
  File "/opt/odoo/common/build", line 29, in <module>
    subprocess.check_call(command)
  File "/usr/lib/python3.5/subprocess.py", line 266, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.5/subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
    raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
ERROR: Service 'odoo' failed to build: The command '/opt/odoo/common/build' returned a non-zero code: 1

A simple rm odoo/custom/build.d/.empty solved it :)

yajo commented 7 years ago

OK with the workaround I already have a hint on what to fix, thanks!

BTW, your system details?

yajo commented 7 years ago

For some reason, the .empty file there is set as executable by your user. That's quite absurd, but you could have a problem with your filesystem or user configuration.

What's the output of ls -lA odoo/custom/build.d before you boot the container and hit the error?

Doing chmod a=rw odoo/custom/build.d/.empty and rebuilding the environment fixes the problem?

Next, do umask 0027 before running all the code from the howto and run again. Does it still happen?

Thanks.

Balazs23 commented 7 years ago

You've right, the empty files have the executable flag after the git clone:

⇒  ls -lA odoo/custom/build.d
total 0
-rwxrwxrwx 1 balazs balazs 0 okt   12 16:05 .empty

It is a virtual machine - ubuntu - just for test and play with a mounted virtual disk

yajo commented 7 years ago

Then fixed in https://github.com/Tecnativa/docker-odoo-base/commit/3153dc9cde78b23d26ea8e9e9e5b7af7f76d8cf9.

joserprieto commented 7 years ago

It works for me, too.

Many thanks, @Yajo.

PD: sorry for the delay, but i have a lot of work :(