[IMP] use ENTRYPOINT instead of cmd and permit giving command arguments

This commit is contained in:
Samus CTO 2015-02-27 14:41:23 +01:00
parent a86b7e6dbc
commit 22de85b69e
2 changed files with 4 additions and 2 deletions

View File

@ -45,4 +45,4 @@ COPY ./openerp-server.conf /etc/odoo/
# Mount /var/lib/odoo to allow restoring filestore
VOLUME ["/var/lib/odoo"]
CMD ["/run.sh"]
ENTRYPOINT ["/run.sh"]

View File

@ -1,5 +1,7 @@
#!/bin/bash
[ "$1" != "--" ] && exec "$@" || shift
CONFIG_FILE=/etc/odoo/openerp-server.conf
# sets a configuration variable in openerp-server.conf
@ -21,4 +23,4 @@ set_config "db_user" $DB_ENV_POSTGRES_USER
set_config "db_password" $DB_ENV_POSTGRES_PASSWORD
# start Odoo
exec gosu odoo /usr/bin/openerp-server --config $CONFIG_FILE
exec gosu odoo /usr/bin/openerp-server --config $CONFIG_FILE "$@"