58 lines
2.2 KiB
Docker
58 lines
2.2 KiB
Docker
FROM oraclelinux:8
|
|
LABEL maintainer="Yaltik - Fabien Bourgeois <fabien@yaltik.com>"
|
|
|
|
# Odoo dependencies from OL repository and from EPEL, WKHTML
|
|
# Then PG96 and fonts
|
|
# COPY pkgs/odoo10c7/*.tgz ./
|
|
COPY postgres96-ol8.repo /etc/yum.repos.d/postgres96.repo
|
|
RUN yum -y groupinstall "Development Tools" && \
|
|
yum -y install zlib-devel bzip2-devel openssl openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel libpcap xz-devel git mercurial libpng libjpeg libXext curl xorg-x11-font-utils fontconfig libevent-devel libxml2-devel libxslt-devel openldap-devel openjpeg2 freetype-devel libjpeg-turbo-devel libtiff-devel kernel-devel mailcap liberation-fonts nodejs npm python2-pip python2-devel && \
|
|
yum --enablerepo=pgdg96-archive -y install libpqxx postgresql96-libs && \
|
|
yum -y install https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos8.x86_64.rpm && \
|
|
yum clean all && \
|
|
/usr/sbin/update-alternatives --set python /usr/bin/python2 && \
|
|
ln -s /usr/bin/pip2 /usr/local/bin/pip
|
|
|
|
|
|
# Install NPM dependencies and Python ones
|
|
RUN npm install -g less@2 less-plugin-clean-css@1.5.1 && \
|
|
pip install --no-cache-dir -U pip==20.3.4 setuptools==44.1.1
|
|
|
|
# Postgres 96 needs to be compiled
|
|
# bison-devel, wget, ccache...
|
|
# RUN git clone --depth 1 --branch REL9_6_24 git://git.postgresql.org/git/postgresql.git /tmp/postgresql
|
|
WORKDIR /tmp/
|
|
RUN curl -LO https://ftp.postgresql.org/pub/source/v9.6.24/postgresql-9.6.24.tar.gz && \
|
|
tar xzf postgresql-9.6.24.tar.gz
|
|
WORKDIR /tmp/postgresql-9.6.24
|
|
RUN ./configure && make && make install && ln -s /usr/local/pgsql/bin/* /usr/local/bin/
|
|
|
|
# Create odoo user
|
|
RUN useradd odoo -md /opt/odoo
|
|
|
|
# Install OCB 10.0 latest
|
|
ENV ODOO_BRANCH 10.0
|
|
WORKDIR /opt/odoo
|
|
# Default user : odoo
|
|
USER odoo
|
|
RUN mkdir pipcache data backups extra-addons custom-addons && \
|
|
git clone -b ${ODOO_BRANCH} --depth 1 https://github.com/OCA/OCB.git && \
|
|
pip install --user --no-cache-dir -r OCB/requirements.txt
|
|
|
|
WORKDIR /opt/odoo
|
|
|
|
# Launch scripts
|
|
COPY ./launch10.sh ./
|
|
COPY ./genconf.sh ./
|
|
|
|
# Post-install tasks
|
|
RUN touch odoo.conf
|
|
|
|
# Odoo default ports
|
|
EXPOSE 8069 8072
|
|
|
|
# Volumes : data dir for filestore and addons
|
|
VOLUME /opt/odoo/data
|
|
|
|
CMD [ "bash", "launch10.sh" ]
|