Spotter-VM/lxc-apps/odoo/image

40 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2021-03-21 11:24:17 +01:00
IMAGE odoo_14.0.0-210321
FROM alpine3.12-python3.8_3.8.5-210106
2018-11-17 22:08:10 +01:00
RUN EOF
# Install runtime dependencies
2021-03-21 11:24:17 +01:00
apk --no-cache add libffi libjpeg-turbo libpq nodejs ttf-dejavu ttf-droid ttf-freefont ttf-liberation ttf-ubuntu-font-family wkhtmltopdf
2018-11-17 22:08:10 +01:00
# Install build dependencies
2021-03-21 11:24:17 +01:00
apk --no-cache add --virtual .deps build-base git libffi-dev libjpeg-turbo-dev libxml2-dev libxslt-dev linux-headers msttcorefonts-installer openldap-dev postgresql-dev python3-dev
# Update fonts
update-ms-fonts
fc-cache -f
# Replace wkhtmltopdf
# Extracted from https://github.com/Surnet/docker-wkhtmltopdf
# wkhtmltopdf 0.12.7 is expected to support Alpine linux out of the box
wget https://repo.spotter.cz/libwkhtmltox.tar.xz -O - | tar -xJf - -C /
2018-11-17 22:08:10 +01:00
# Clone Odoo repository
git clone -b 14.0 --depth 1 https://github.com/odoo/odoo.git /srv/odoo
2018-11-17 22:08:10 +01:00
# Install Odoo
cd /srv/odoo
pip3 install -r requirements.txt
# Create OS user
addgroup -S -g 8080 odoo
adduser -S -u 8080 -h /srv/odoo -s /bin/false -g odoo -G odoo odoo
2018-11-17 22:08:10 +01:00
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
2020-03-20 20:22:27 +01:00
USER odoo
2018-11-17 22:08:10 +01:00
CMD /srv/odoo/odoo-bin -c srv/odoo/odoo.conf