diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..69266c7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +FROM odoo:10 + +USER root + +COPY ./source.list /etc/apt/sources.list +COPY ./pgpd.list /etc/apt/sources.list.d/pgdg.list +COPY ./apt-config /etc/apt/apt.conf.d/99force-archive +COPY ./addons/OpenUpgrade/requirements.txt /root/requirements.txt + +RUN apt-get update +# RUN apt-cache policy pip >> aa.txt +# RUN apt-cache madison pip >> aa.txt + +# RUN apt-get install -y --force-yes libc6 +RUN pip install --upgrade pip==10.0.1 +RUN pip install --upgrade pip +RUN apt-get install -y --force-yes libpq5=11.16-0+deb10u1 libpq-dev=11.16-0+deb10u1 libtiff5-dev +RUN apt-get install -y --force-yes libxml2 libxml2-dev libxslt1-dev python-dev gcc +RUN apt-get install -y --force-yes zlib1g-dev libsasl2-dev libldap2-dev libssl-dev + +# odoo:9 +RUN apt-get install -y --force-yes libtiff5-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk +RUN pip install pysftp + +# RUN cd /mnt/extra-addons/OpenUpgrade && pip install -r requirements.txt --ignore-installed + +RUN pip install openupgradelib + +RUN cd /root && pip install -r requirements.txt --ignore-installed + +# ENV PATH="${PATH}:/usr/bin" +# RUN echo "odoo:x:105:109::/var/lib/odoo:/bin/false" >> /etc/passwd + +# RUN mv /usr/bin/odoo_bak /usr/bin/odoo + + +USER odoo + +# ENTRYPOINT ["/entrypoint.sh"] + +# CMD ["odoo"] \ No newline at end of file diff --git a/Dockerfile_10 b/Dockerfile_10 new file mode 100644 index 0000000..5f6ceb7 --- /dev/null +++ b/Dockerfile_10 @@ -0,0 +1,33 @@ +FROM odoo:9 + +USER root + +COPY ./source.list /etc/apt/sources.list +COPY ./pgpd.list /etc/apt/sources.list.d/pgdg.list +COPY ./apt-config /etc/apt/apt.conf.d/99force-archive + +RUN apt-get update +# RUN apt-cache policy pip >> aa.txt +# RUN apt-cache madison pip >> aa.txt + +# RUN apt-get install -y --force-yes libc6 +RUN pip install --upgrade pip==10.0.1 +RUN pip install --upgrade pip +RUN apt-get install -y --force-yes libpq5=11.16-0+deb10u1 libpq-dev=11.16-0+deb10u1 +RUN apt-get install -y --force-yes libxml2 libxml2-dev libxslt1-dev python-dev gcc +RUN apt-get install -y --force-yes zlib1g-dev libsasl2-dev libldap2-dev libssl-dev + +# RUN cd /mnt/extra-addons/OpenUpgrade && pip install -r requirements.txt --ignore-installed +RUN pip install openupgradelib + +# ENV PATH="${PATH}:/usr/bin" +# RUN echo "odoo:x:105:109::/var/lib/odoo:/bin/false" >> /etc/passwd + +# RUN mv /usr/bin/odoo_bak /usr/bin/odoo + + +USER odoo + +# ENTRYPOINT ["/entrypoint.sh"] + +# CMD ["odoo"] \ No newline at end of file diff --git a/apt-config b/apt-config new file mode 100644 index 0000000..1163a03 --- /dev/null +++ b/apt-config @@ -0,0 +1,3 @@ +Acquire::AllowInsecureRepositories "true"; +Acquire::Check-Valid-Until "false"; +APT::Get::AutomaticRemove "false"; diff --git a/odoo/entrypoint.sh b/odoo/entrypoint.sh index ecfca2d..7dc3adc 100755 --- a/odoo/entrypoint.sh +++ b/odoo/entrypoint.sh @@ -5,7 +5,7 @@ set -e # set the postgres database host, port, user and password according to the environment # and pass them as arguments to the odoo process if not present in the config file : ${HOST:=${DB_PORT_5432_TCP_ADDR:=${POSTGRES_HOST:='db'}}} -: ${PORT:=${DB_PORT_5432_TCP_PORT:=${POSTGRES_PORT:=5432}}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=${POSTGRES_PORT:='5432'}}} : ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} : ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} diff --git a/pgpd.list b/pgpd.list new file mode 100644 index 0000000..09a3266 --- /dev/null +++ b/pgpd.list @@ -0,0 +1,2 @@ +deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main +# deb http://apt-archive.postgresql.org/pub/repos/apt/ jessie-pgdg-archive main \ No newline at end of file diff --git a/source.list b/source.list new file mode 100644 index 0000000..c3f51e8 --- /dev/null +++ b/source.list @@ -0,0 +1,4 @@ +deb http://snapshot.debian.org/archive/debian/20220702T153535Z jessie main +deb http://snapshot.debian.org/archive/debian-security/20220702T153535Z jessie/updates main +deb http://snapshot.debian.org/archive/debian/20220702T153535Z jessie-updates main +deb http://deb.debian.org/debian buster main non-free contrib