Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker config for odoo openUpgrade #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
33 changes: 33 additions & 0 deletions Dockerfile_10
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 3 additions & 0 deletions apt-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Acquire::AllowInsecureRepositories "true";
Acquire::Check-Valid-Until "false";
APT::Get::AutomaticRemove "false";
2 changes: 1 addition & 1 deletion odoo/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'}}}

Expand Down
2 changes: 2 additions & 0 deletions pgpd.list
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions source.list
Original file line number Diff line number Diff line change
@@ -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