2016-12-30 18:41:46 -05:00
|
|
|
# How-to
|
|
|
|
|
|
|
|
This repo is structured the following way:
|
|
|
|
|
|
|
|
- `${ODOO_VERSION}/`
|
|
|
|
- `base/`
|
|
|
|
- `Dockerfile`: file to build the `${ODOO_VERSION}-base` container image
|
|
|
|
- `${ODOO_RELEASE}/`
|
|
|
|
- `Dockerfile`: file to build the `${ODOO_VERSION}.${ODOO_RELEASE}` container image taking `${ODOO_VERSION}-base` as a base
|
|
|
|
|
|
|
|
This repo contains a few bash scripts to
|
|
|
|
help you generate docker container images.
|
|
|
|
|
2016-12-30 21:12:20 -05:00
|
|
|
`generate_releases.sh` will go to nightly.odoo.com and
|
|
|
|
grab the available releases and SHA1 checksum and
|
|
|
|
rebuild the `${ODOO_VERSION}/releases.txt`.
|
|
|
|
|
2016-12-30 21:44:22 -05:00
|
|
|
`generate.sh <optional:release>` will read the `${ODOO_VERSION}/releases.txt` file,
|
2016-12-30 18:41:46 -05:00
|
|
|
parse the `release:checksum` lines and
|
|
|
|
generate the `${ODOO_VERSION}/${ODOO_RELEASE}/Dockerfile`.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
$ bash generate.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
`build.sh` is used to build the docker container images locally.
|
|
|
|
|
|
|
|
```bash
|
2016-12-30 21:44:22 -05:00
|
|
|
# all
|
2016-12-30 18:41:46 -05:00
|
|
|
$ bash build.sh
|
2016-12-30 21:44:22 -05:00
|
|
|
|
|
|
|
# single release
|
|
|
|
$ bash build.sh 20161230
|
2016-12-30 18:41:46 -05:00
|
|
|
```
|
|
|
|
|
|
|
|
There are some auxiliary bash scripts to run docker container locally.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# start an Odoo release container
|
|
|
|
$ bash start_container.sh 9.0 20161123
|
|
|
|
|
|
|
|
# open interactive session on the Odoo container
|
|
|
|
$ bash login.sh 9.0 20161123
|
|
|
|
|
|
|
|
# stop and destroy
|
|
|
|
$ bash stop_container.sh 9.0 20161123
|
|
|
|
```
|