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

Upgrade to use odoo-tools for entrypoints etc #7

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
78 changes: 39 additions & 39 deletions 10.0-nightly/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,23 @@ LABEL maintainer="Archeti <[email protected]>"

# Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8
ARG DEBIAN_FRONTEND=noninteractive

COPY ./platform.sh /platform.sh
# Install some dependencies python3.7
RUN set -x; \
apt-get update \
export ARCH=`sh /platform.sh` \
# Setup deb source for postgresql client
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
gnupg \
python-wheel \
python-setuptools \
python-pip \
python2.7 \
libpython2.7 \
curl \
gnupg \
libpq-dev \
libsasl2-2 \
libldap-2.4-2 \
Expand All @@ -23,28 +28,26 @@ RUN set -x; \
libxslt1.1 \
sudo \
node-less \
# python-yaml \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb \
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
&& echo 'deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > etc/apt/sources.list.d/pgdg.list \
&& export GNUPGHOME="$(mktemp -d)" \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
&& gpg --batch --armor --export "${repokey}" > /etc/apt/trusted.gpg.d/pgdg.gpg.asc \
&& gpgconf --kill all \
&& rm -rf "$GNUPGHOME" \
# Download deb for wkhtmltox
&& echo "Downloading https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_${ARCH}.deb" \
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_${ARCH}.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client \
./wkhtmltox.deb \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb

# Install latest postgresql-client
RUN set -x; \
echo 'deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > etc/apt/sources.list.d/pgdg.list \
&& export GNUPGHOME="$(mktemp -d)" \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
&& gpg --batch --armor --export "${repokey}" > /etc/apt/trusted.gpg.d/pgdg.gpg.asc \
&& gpgconf --kill all \
&& rm -rf "$GNUPGHOME" \
&& apt-get update \
&& apt-get install -y postgresql-client \
&& rm -rf /var/lib/apt/lists/*

ENV PATH=/usr/local/bin:$PATH
ENV PATH=/var/lib/odoo/.local/bin:/usr/local/bin:$PATH
# Install Odoo Including things from sources
ENV ODOO_VERSION 10.0
ENV ODOO_RELEASE=20210625
ENV ODOO_RELEASE=
ARG ODOO_ARCHIVE=odoo_${ODOO_VERSION}.${ODOO_RELEASE}.tar.gz
RUN set -x; \
apt-get update \
Expand All @@ -56,15 +59,14 @@ RUN set -x; \
libxml2-dev \
libxmlsec1-dev \
libxslt1-dev \
git \
&& pip install -U pip \
&& /usr/bin/env pip install \
psycogreen \
odoo-tools==0.0.65 \
\
&& curl -o requirements.txt https://raw.githubusercontent.com/odoo/odoo/${ODOO_VERSION}/requirements.txt \
&& pip install -U pip \
&& pip install -r requirements.txt \
&& /usr/bin/env pip install https://nightly.odoo.com/${ODOO_VERSION}/nightly/src/${ODOO_ARCHIVE} \
&& cd / \
&& odoo-install --release "" --version "10.0" --repo "https://github.com/odoo/odoo.git" --ref "" \
&& [ -f /usr/local/bin/odoo.py ] && ln -s /usr/local/bin/odoo.py /usr/local/bin/odoo \
|| cd / \
&& apt-get --purge remove -y \
build-essential \
python2.7-dev \
Expand All @@ -73,17 +75,14 @@ RUN set -x; \
libxml2-dev \
libxmlsec1-dev \
libxslt1-dev \
git \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

VOLUME /etc/odoo
VOLUME /var/lib/odoo
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /root/.cache

COPY ./odoo.conf /etc/odoo/
COPY ./entrypoint.py /
COPY ./sudo-entrypoint.py /
COPY ./find_modules.py /scripts/find_modules.py
COPY ./prepare_project.py /scripts/prepare_project.py

ARG UID=1000
ARG GID=1000
Expand All @@ -93,12 +92,13 @@ RUN mkdir /addons \
&& useradd -r -u ${UID} -g odoo -b /var/lib -m odoo \
&& chown odoo /etc/odoo/odoo.conf \
&& chown -R odoo:odoo /addons \
&& cp /usr/local/bin/odoo.py /usr/local/bin/odoo || true \
&& echo "odoo ALL=(ALL:ALL) NOPASSWD:SETENV: /sudo-entrypoint.py" >> /etc/sudoers

ENV OPENERP_SERVER /etc/odoo/odoo.conf
VOLUME /etc/odoo
VOLUME /var/lib/odoo

ENV ODOO_RC /etc/odoo/odoo.conf
ENV ODOO_BASE_PATH /usr/local/lib/python2.7/dist-packages/odoo/addons
ENV ODOO_BASE_PATH /usr/local/lib/python2.7/dist-packages/openerp/addons
# Env variable defined to monitor the kind of service running
# it could be a staging/production/test or anything and undefined
# is the default in case we need to know servers that aren't correctly
Expand All @@ -111,15 +111,15 @@ expose 8071
USER odoo

LABEL version="10.0"
LABEL release="20210625"
LABEL release=""

LABEL org.opencontainers.image.created="2021-06-25T17:55:41.198545"
LABEL org.opencontainers.image.created="2022-11-04T20:06:13.821080"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/llacroix/odoo"
LABEL org.opencontainers.image.authors="Archeti <info@archeti.ca>"
LABEL org.opencontainers.image.authors="OdooPlus <info@odoo.plus>"
LABEL org.opencontainers.image.documentation="https://github.com/llacroix/odoo-docker"
LABEL org.opencontainers.image.source="https://github.com/llacroix/odoo-docker"
LABEL org.opencontainers.image.version="10.0"
LABEL org.opencontainers.image.vendor="ArcheTI"
LABEL org.opencontainers.image.vendor="OdooPlus"
LABEL org.opencontainers.image.ref.name="10.0-nightly"
LABEL org.opencontainers.image.title="Odoo 10.0"
LABEL org.opencontainers.image.description="Full featured odoo image that make odoo deployment fun and secure."
Expand Down
Loading