Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions 11.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 12.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 13.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 14.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 15.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 16.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 17.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 18.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
3 changes: 0 additions & 3 deletions 19.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Requirements for the project itself and for Odoo.
# When we install Odoo with -e, odoo.py is available in the PATH and
# 'openerp' in the PYTHONPATH
#
# They are installed only after all the project's files have been copied
# into the image (with ONBUILD)
-e .
-e src
32 changes: 1 addition & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ https://github.com/camptocamp/docker-odoo-project/pkgs/container/odoo-project

## Image Flavors

There are 4 flavors of the image:
There are 2 flavors of the image:

- normal: `odoo-project:${odoo_version}-${tag_version}`
- normal-onbuild: `odoo-project:${odoo_version}-${tag_version}-onbuild`
- batteries-included: `odoo-project:${odoo_version}-${tag_version}-batteries`
- batteries-included-onbuild: `odoo-project:${odoo_version}-${tag_version}-batteries-onbuild`

Note: in production, we strongly recommend to never use the "latest" tag.
Instead use a specific version in order to be able to rebuild identical images.
Expand All @@ -59,49 +57,21 @@ The list of package (with their version) is defined in the extra_requirements.tx

you can also see the Dockerfile that generate this image here: [common/Dockerfile-batteries](common/Dockerfile-batteries)

### With or without onbuild?

The `onbuild` flavors add default *ONBUILD* instructions in the Dockerfile in
order to simplify the generation of custom image.

For more information on the *ONBUILD* command please read Docker documentation

The dockerfile for this flavor is here: [common/Dockerfile-onbuild](common/Dockerfile-onbuild)

For comparison, two example of Dockerfile are shown in the project example here:

- without onbuild: [example/odoo/Dockerfile](example/odoo/Dockerfile)
- with onbuild: [example/odoo/Dockerfile-onbuild](example/odoo/Dockerfile-onbuild)

Note: the Dockerfile of the onbuild flavor is shorter but

- you can not create intermediary custom image based on it (as ONBUILD instruction need to be played).
- the official docker images have deprecated their `-onbuild` images: https://github.com/docker-library/official-images/issues/2076


## Build

The images should be build with `make`:

Normal flavors:

```
# generate image camptocamp/odoo-project:11.0-latest and camptocamp/odoo-project:11.0-latest-onbuild
$ make VERSION=11.0
# generate image camptocamp/odoo-project:10.0-latest and camptocamp/odoo-project:10.0-latest-onbuild
$ make VERSION=10.0
# generate image camptocamp/odoo-project:9.0-latest and camptocamp/odoo-project:9.0-latest-onbuild
$ make VERSION=9.0
```

Batteries-included flavors:
```
# generate image camptocamp/odoo-project:11.0-batteries-latest and camptocamp/odoo-project:11.0-latest-batteries-onbuild
$ make VERSION=11.0 BATTERIES=True
# generate image camptocamp/odoo-project:10.0-batteries-latest and camptocamp/odoo-project:10.0-latest-batteries-onbuild
$ make VERSION=10.0 BATTERIES=True
# generate image camptocamp/odoo-project:9.0-batteries-latest and camptocamp/odoo-project:9.0-latest-batteries-onbuild
$ make VERSION=9.0 BATTERIES=True
```


Expand Down
5 changes: 0 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,10 @@ trap on_exit EXIT
cp -r ${VERSION}/. ${TMP}/
cp -r bin/ ${TMP}
cp -rT common/ ${TMP}
cp ${TMP}/Dockerfile-onbuild ${TMP}/Dockerfile-batteries-onbuild
sed -i "1i FROM ${BUILD_TAG}" ${TMP}/Dockerfile-onbuild
sed -i "1i FROM ${BUILD_TAG}" ${TMP}/Dockerfile-batteries
sed -i "1i FROM ${BUILD_TAG}-batteries" ${TMP}/Dockerfile-batteries-onbuild
cp -r install/ ${TMP}
cp -r start-entrypoint.d/ ${TMP}
cp -r before-migrate-entrypoint.d/ ${TMP}

docker build --no-cache -f ${TMP}/Dockerfile -t ${BUILD_TAG} ${TMP}
docker build --no-cache -f ${TMP}/Dockerfile-onbuild -t ${BUILD_TAG}-onbuild ${TMP}
docker build --no-cache -f ${TMP}/Dockerfile-batteries -t ${BUILD_TAG}-batteries ${TMP}
docker build --no-cache -f ${TMP}/Dockerfile-batteries-onbuild -t ${BUILD_TAG}-batteries-onbuild ${TMP}
16 changes: 0 additions & 16 deletions common/Dockerfile-onbuild

This file was deleted.

Loading