40 lines
1021 B
Plaintext
40 lines
1021 B
Plaintext
IMAGE odoo
|
|
LAYER shared/alpine
|
|
LAYER shared/libxml
|
|
LAYER shared/python3
|
|
LAYER shared/nodejs
|
|
LAYER odoo/odoo
|
|
|
|
FIXLAYER /usr/bin/fix-apk
|
|
|
|
RUN EOF
|
|
# Install runtime dependencies
|
|
apk --no-cache add libjpeg-turbo libpq
|
|
|
|
# Install build dependencies
|
|
apk --no-cache add --virtual .deps build-base git libjpeg-turbo-dev libxml2-dev libxslt-dev linux-headers openldap-dev postgresql-dev python3-dev
|
|
|
|
# Clone Odoo repository
|
|
git clone --depth 1 https://github.com/odoo/odoo.git /srv/odoo
|
|
|
|
# Install Odoo
|
|
cd /srv/odoo
|
|
pip3 install -r requirements.txt
|
|
|
|
# Create OS user
|
|
addgroup -S -g 8019 odoo
|
|
adduser -S -u 8019 -h /srv/odoo -s /bin/false -g odoo -G odoo odoo
|
|
chown -R odoo:odoo /srv/odoo
|
|
|
|
# Cleanup
|
|
apk --no-cache del .deps
|
|
find /srv/odoo -name '.git*' -exec rm -rf {} +
|
|
rm -rf /usr/local/share/.cache
|
|
EOF
|
|
|
|
MOUNT FILE /srv/odoo/conf/odoo.conf srv/odoo/odoo.conf
|
|
MOUNT DIR /srv/odoo/data srv/odoo/data
|
|
|
|
USER 8019 8019
|
|
CMD /srv/odoo/odoo-bin -c srv/odoo/odoo.conf
|