Compare commits
1 Commits
master
...
master-add
Author | SHA1 | Date | |
---|---|---|---|
|
362cef5db1 |
@ -1,49 +0,0 @@
|
||||
name: Build, Secure, and Push Docker Image on Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published, prereleased]
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
DOCKER_IMAGE_NAME: docker.io/openharbor/odoo
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Log in to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Determine Tag Type
|
||||
id: tag_type
|
||||
run: |
|
||||
if [[ "${{ github.event.release.prerelease }}" == "true" ]]; then
|
||||
echo "tag=dev" >> $GITHUB_ENV
|
||||
else
|
||||
echo "tag=latest" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Build, push, and generate SBOM and provenance
|
||||
run: |
|
||||
docker buildx build \
|
||||
--provenance=true \
|
||||
--sbom=true \
|
||||
--push \
|
||||
-t ${{ env.DOCKER_IMAGE_NAME }}:${{ github.event.release.tag_name }} \
|
||||
-t ${{ env.DOCKER_IMAGE_NAME }}:${{ env.tag }} \
|
||||
./18.0/
|
55
10.0/Dockerfile
Normal file
55
10.0/Dockerfile
Normal file
@ -0,0 +1,55 @@
|
||||
FROM debian:jessie
|
||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||
|
||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||
RUN set -x; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
node-less \
|
||||
python-gevent \
|
||||
python-pip \
|
||||
python-renderpm \
|
||||
python-support \
|
||||
python-watchdog \
|
||||
&& curl -o wkhtmltox.deb -SL http://nightly.odoo.com/extra/wkhtmltox-0.12.1.2_linux-jessie-amd64.deb \
|
||||
&& echo '40e8b906de658a2221b15e4e8cd82565a47d7ee8 wkhtmltox.deb' | sha1sum -c - \
|
||||
&& dpkg --force-depends -i wkhtmltox.deb \
|
||||
&& apt-get -y install -f --no-install-recommends \
|
||||
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false npm \
|
||||
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb \
|
||||
&& pip install psycogreen==1.0
|
||||
|
||||
# Install Odoo
|
||||
ENV ODOO_VERSION 10.0
|
||||
ENV ODOO_RELEASE 20181109
|
||||
RUN set -x; \
|
||||
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||
&& echo '8b24a5a3e36aed8986d3d6b19c8a255ee72cd658 odoo.deb' | sha1sum -c - \
|
||||
&& dpkg --force-depends -i odoo.deb \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install -f --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
||||
|
||||
# Copy entrypoint script and Odoo configuration file
|
||||
COPY ./entrypoint.sh /
|
||||
COPY ./odoo.conf /etc/odoo/
|
||||
RUN chown odoo /etc/odoo/odoo.conf
|
||||
|
||||
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
||||
RUN mkdir -p /mnt/extra-addons \
|
||||
&& chown -R odoo /mnt/extra-addons
|
||||
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
||||
|
||||
# Expose Odoo services
|
||||
EXPOSE 8069 8071
|
||||
|
||||
# Set the default config file
|
||||
ENV ODOO_RC /etc/odoo/odoo.conf
|
||||
|
||||
# Set default user when running the container
|
||||
USER odoo
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["odoo"]
|
@ -2,10 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ -v PASSWORD_FILE ]; then
|
||||
PASSWORD="$(< $PASSWORD_FILE)"
|
||||
fi
|
||||
|
||||
# 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:='db'}}
|
||||
@ -17,11 +13,10 @@ DB_ARGS=()
|
||||
function check_config() {
|
||||
param="$1"
|
||||
value="$2"
|
||||
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
|
||||
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
|
||||
fi;
|
||||
if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
|
||||
DB_ARGS+=("--${param}")
|
||||
DB_ARGS+=("${value}")
|
||||
fi;
|
||||
}
|
||||
check_config "db_host" "$HOST"
|
||||
check_config "db_port" "$PORT"
|
||||
@ -34,12 +29,10 @@ case "$1" in
|
||||
if [[ "$1" == "scaffold" ]] ; then
|
||||
exec odoo "$@"
|
||||
else
|
||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
fi
|
||||
;;
|
||||
-*)
|
||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
;;
|
||||
*)
|
@ -1,5 +1,5 @@
|
||||
[options]
|
||||
addons_path = /mnt/extra-addons
|
||||
addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/odoo/addons
|
||||
data_dir = /var/lib/odoo
|
||||
; admin_passwd = admin
|
||||
; csv_internal_sep = ,
|
59
11.0/Dockerfile
Normal file
59
11.0/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
||||
FROM debian:stretch
|
||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||
|
||||
# Generate locale C.UTF-8 for postgres and general locale data
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||
RUN set -x; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
node-less \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-renderpm \
|
||||
libssl1.0-dev \
|
||||
xz-utils \
|
||||
python3-watchdog \
|
||||
&& curl -o wkhtmltox.tar.xz -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz \
|
||||
&& echo '3f923f425d345940089e44c1466f6408b9619562 wkhtmltox.tar.xz' | sha1sum -c - \
|
||||
&& tar xvf wkhtmltox.tar.xz \
|
||||
&& cp wkhtmltox/lib/* /usr/local/lib/ \
|
||||
&& cp wkhtmltox/bin/* /usr/local/bin/ \
|
||||
&& cp -r wkhtmltox/share/man/man1 /usr/local/share/man/
|
||||
|
||||
# Install Odoo
|
||||
ENV ODOO_VERSION 11.0
|
||||
ENV ODOO_RELEASE 20181109
|
||||
RUN set -x; \
|
||||
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||
&& echo '04823230d99d16dbaf157c55cfad632db4559060 odoo.deb' | sha1sum -c - \
|
||||
&& dpkg --force-depends -i odoo.deb \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install -f --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
||||
|
||||
# Copy entrypoint script and Odoo configuration file
|
||||
RUN pip3 install num2words xlwt
|
||||
COPY ./entrypoint.sh /
|
||||
COPY ./odoo.conf /etc/odoo/
|
||||
RUN chown odoo /etc/odoo/odoo.conf
|
||||
|
||||
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
||||
RUN mkdir -p /mnt/extra-addons \
|
||||
&& chown -R odoo /mnt/extra-addons
|
||||
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
||||
|
||||
# Expose Odoo services
|
||||
EXPOSE 8069 8071
|
||||
|
||||
# Set the default config file
|
||||
ENV ODOO_RC /etc/odoo/odoo.conf
|
||||
|
||||
# Set default user when running the container
|
||||
USER odoo
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["odoo"]
|
@ -2,10 +2,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ -v PASSWORD_FILE ]; then
|
||||
PASSWORD="$(< $PASSWORD_FILE)"
|
||||
fi
|
||||
|
||||
# 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:='db'}}
|
||||
@ -17,11 +13,10 @@ DB_ARGS=()
|
||||
function check_config() {
|
||||
param="$1"
|
||||
value="$2"
|
||||
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
|
||||
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
|
||||
fi;
|
||||
if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
|
||||
DB_ARGS+=("--${param}")
|
||||
DB_ARGS+=("${value}")
|
||||
fi;
|
||||
}
|
||||
check_config "db_host" "$HOST"
|
||||
check_config "db_port" "$PORT"
|
||||
@ -34,12 +29,10 @@ case "$1" in
|
||||
if [[ "$1" == "scaffold" ]] ; then
|
||||
exec odoo "$@"
|
||||
else
|
||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
fi
|
||||
;;
|
||||
-*)
|
||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
;;
|
||||
*)
|
59
12.0/Dockerfile
Normal file
59
12.0/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
||||
FROM debian:stretch
|
||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||
|
||||
# Generate locale C.UTF-8 for postgres and general locale data
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||
RUN set -x; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
node-less \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-renderpm \
|
||||
libssl1.0-dev \
|
||||
xz-utils \
|
||||
python3-watchdog \
|
||||
&& curl -o wkhtmltox.tar.xz -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz \
|
||||
&& echo '3f923f425d345940089e44c1466f6408b9619562 wkhtmltox.tar.xz' | sha1sum -c - \
|
||||
&& tar xvf wkhtmltox.tar.xz \
|
||||
&& cp wkhtmltox/lib/* /usr/local/lib/ \
|
||||
&& cp wkhtmltox/bin/* /usr/local/bin/ \
|
||||
&& cp -r wkhtmltox/share/man/man1 /usr/local/share/man/
|
||||
|
||||
# Install Odoo
|
||||
ENV ODOO_VERSION 12.0
|
||||
ENV ODOO_RELEASE 20181109
|
||||
RUN set -x; \
|
||||
curl -o odoo.deb -SL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||
&& echo 'fcaa0f72ecc8a4fa5636948a8966f7584eab1fac odoo.deb' | sha1sum -c - \
|
||||
&& dpkg --force-depends -i odoo.deb \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install -f --no-install-recommends \
|
||||
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
||||
|
||||
# Copy entrypoint script and Odoo configuration file
|
||||
RUN pip3 install num2words xlwt
|
||||
COPY ./entrypoint.sh /
|
||||
COPY ./odoo.conf /etc/odoo/
|
||||
RUN chown odoo /etc/odoo/odoo.conf
|
||||
|
||||
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
||||
RUN mkdir -p /mnt/extra-addons \
|
||||
&& chown -R odoo /mnt/extra-addons
|
||||
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
||||
|
||||
# Expose Odoo services
|
||||
EXPOSE 8069 8071
|
||||
|
||||
# Set the default config file
|
||||
ENV ODOO_RC /etc/odoo/odoo.conf
|
||||
|
||||
# Set default user when running the container
|
||||
USER odoo
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["odoo"]
|
@ -2,41 +2,26 @@
|
||||
|
||||
set -e
|
||||
|
||||
if [ -v PASSWORD_FILE ]; then
|
||||
PASSWORD="$(< $PASSWORD_FILE)"
|
||||
fi
|
||||
|
||||
# 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:='db'}}
|
||||
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
|
||||
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
|
||||
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
|
||||
: ${DB_NAME:=${DB_ENV_POSTGRES_DB_NAME:=${POSTGRES_DB_NAME:='odoo'}}}
|
||||
|
||||
DB_ARGS=()
|
||||
PY_DB_ARGS=()
|
||||
function check_config() {
|
||||
param="$1"
|
||||
value="$2"
|
||||
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
|
||||
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
|
||||
fi;
|
||||
|
||||
if [ "${param}" != "db_name" ]; then
|
||||
if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
|
||||
DB_ARGS+=("--${param}")
|
||||
DB_ARGS+=("${value}")
|
||||
fi;
|
||||
|
||||
PY_DB_ARGS+=("--${param}")
|
||||
PY_DB_ARGS+=("${value}")
|
||||
}
|
||||
|
||||
check_config "db_host" "$HOST"
|
||||
check_config "db_port" "$PORT"
|
||||
check_config "db_user" "$USER"
|
||||
check_config "db_password" "$PASSWORD"
|
||||
check_config "db_name" "$DB_NAME"
|
||||
|
||||
case "$1" in
|
||||
-- | odoo)
|
||||
@ -44,12 +29,10 @@ case "$1" in
|
||||
if [[ "$1" == "scaffold" ]] ; then
|
||||
exec odoo "$@"
|
||||
else
|
||||
wait-for-psql.py ${PY_DB_ARGS[@]} --timeout=30
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
fi
|
||||
;;
|
||||
-*)
|
||||
wait-for-psql.py ${PY_DB_ARGS[@]} --timeout=30
|
||||
exec odoo "$@" "${DB_ARGS[@]}"
|
||||
;;
|
||||
*)
|
102
16.0/Dockerfile
102
16.0/Dockerfile
@ -1,102 +0,0 @@
|
||||
FROM debian:bullseye-slim
|
||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||
|
||||
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
|
||||
|
||||
# Generate locale C.UTF-8 for postgres and general locale data
|
||||
ENV LANG C.UTF-8
|
||||
|
||||
# Retrieve the target architecture to install the correct wkhtmltopdf package
|
||||
ARG TARGETARCH
|
||||
|
||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
dirmngr \
|
||||
fonts-noto-cjk \
|
||||
gnupg \
|
||||
libssl-dev \
|
||||
node-less \
|
||||
npm \
|
||||
python3-magic \
|
||||
python3-num2words \
|
||||
python3-odf \
|
||||
python3-pdfminer \
|
||||
python3-pip \
|
||||
python3-phonenumbers \
|
||||
python3-pyldap \
|
||||
python3-qrcode \
|
||||
python3-renderpm \
|
||||
python3-setuptools \
|
||||
python3-slugify \
|
||||
python3-vobject \
|
||||
python3-watchdog \
|
||||
python3-xlrd \
|
||||
python3-xlwt \
|
||||
xz-utils && \
|
||||
if [ -z "${TARGETARCH}" ]; then \
|
||||
TARGETARCH="$(dpkg --print-architecture)"; \
|
||||
fi; \
|
||||
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
|
||||
case ${TARGETARCH} in \
|
||||
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=9df8dd7b1e99782f1cfa19aca665969bbd9cc159 ;; \
|
||||
"arm64") WKHTMLTOPDF_SHA=58c84db46b11ba0e14abb77a32324b1c257f1f22 ;; \
|
||||
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=7ed8f6dcedf5345a3dd4eeb58dc89704d862f9cd ;; \
|
||||
esac \
|
||||
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bullseye_${WKHTMLTOPDF_ARCH}.deb \
|
||||
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
|
||||
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
|
||||
|
||||
# install latest postgresql-client
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& GNUPGHOME="$(mktemp -d)" \
|
||||
&& export GNUPGHOME \
|
||||
&& 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 --no-install-recommends -y postgresql-client \
|
||||
&& rm -f /etc/apt/sources.list.d/pgdg.list \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install rtlcss (on Debian buster)
|
||||
RUN npm install -g rtlcss
|
||||
|
||||
# Install Odoo
|
||||
ENV ODOO_VERSION 16.0
|
||||
ARG ODOO_RELEASE=20241220
|
||||
ARG ODOO_SHA=6312a02426f8b8c8b7578947cd8733e8f042de54
|
||||
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends ./odoo.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
||||
|
||||
# Copy entrypoint script and Odoo configuration file
|
||||
COPY ./entrypoint.sh /
|
||||
COPY ./odoo.conf /etc/odoo/
|
||||
|
||||
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
||||
RUN chown odoo /etc/odoo/odoo.conf \
|
||||
&& mkdir -p /mnt/extra-addons \
|
||||
&& chown -R odoo /mnt/extra-addons
|
||||
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
||||
|
||||
# Expose Odoo services
|
||||
EXPOSE 8069 8071 8072
|
||||
|
||||
# Set the default config file
|
||||
ENV ODOO_RC /etc/odoo/odoo.conf
|
||||
|
||||
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
|
||||
|
||||
# Set default user when running the container
|
||||
USER odoo
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["odoo"]
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import psycopg2
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
arg_parser = argparse.ArgumentParser()
|
||||
arg_parser.add_argument('--db_host', required=True)
|
||||
arg_parser.add_argument('--db_port', required=True)
|
||||
arg_parser.add_argument('--db_user', required=True)
|
||||
arg_parser.add_argument('--db_password', required=True)
|
||||
arg_parser.add_argument('--timeout', type=int, default=5)
|
||||
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
start_time = time.time()
|
||||
while (time.time() - start_time) < args.timeout:
|
||||
try:
|
||||
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname='postgres')
|
||||
error = ''
|
||||
break
|
||||
except psycopg2.OperationalError as e:
|
||||
error = e
|
||||
else:
|
||||
conn.close()
|
||||
time.sleep(1)
|
||||
|
||||
if error:
|
||||
print("Database connection failure: %s" % error, file=sys.stderr)
|
||||
sys.exit(1)
|
104
17.0/Dockerfile
104
17.0/Dockerfile
@ -1,104 +0,0 @@
|
||||
FROM ubuntu:jammy
|
||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||
|
||||
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
|
||||
|
||||
# Generate locale C.UTF-8 for postgres and general locale data
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
# Retrieve the target architecture to install the correct wkhtmltopdf package
|
||||
ARG TARGETARCH
|
||||
|
||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
dirmngr \
|
||||
fonts-noto-cjk \
|
||||
gnupg \
|
||||
libssl-dev \
|
||||
node-less \
|
||||
npm \
|
||||
python3-magic \
|
||||
python3-num2words \
|
||||
python3-odf \
|
||||
python3-pdfminer \
|
||||
python3-pip \
|
||||
python3-phonenumbers \
|
||||
python3-pyldap \
|
||||
python3-qrcode \
|
||||
python3-renderpm \
|
||||
python3-setuptools \
|
||||
python3-slugify \
|
||||
python3-vobject \
|
||||
python3-watchdog \
|
||||
python3-xlrd \
|
||||
python3-xlwt \
|
||||
xz-utils && \
|
||||
if [ -z "${TARGETARCH}" ]; then \
|
||||
TARGETARCH="$(dpkg --print-architecture)"; \
|
||||
fi; \
|
||||
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
|
||||
case ${TARGETARCH} in \
|
||||
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=967390a759707337b46d1c02452e2bb6b2dc6d59 ;; \
|
||||
"arm64") WKHTMLTOPDF_SHA=90f6e69896d51ef77339d3f3a20f8582bdf496cc ;; \
|
||||
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=5312d7d34a25b321282929df82e3574319aed25c ;; \
|
||||
esac \
|
||||
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_${WKHTMLTOPDF_ARCH}.deb \
|
||||
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
|
||||
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
|
||||
|
||||
# install latest postgresql-client
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ jammy-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& GNUPGHOME="$(mktemp -d)" \
|
||||
&& export GNUPGHOME \
|
||||
&& 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 --no-install-recommends -y postgresql-client \
|
||||
&& rm -f /etc/apt/sources.list.d/pgdg.list \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install rtlcss (on Debian buster)
|
||||
RUN npm install -g rtlcss
|
||||
|
||||
# Install Odoo
|
||||
ENV ODOO_VERSION 17.0
|
||||
ARG ODOO_RELEASE=20241220
|
||||
ARG ODOO_SHA=db83c23c2c4a4b5c7881cde0c4d8868c7b9adf10
|
||||
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends ./odoo.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
||||
|
||||
# Copy entrypoint script and Odoo configuration file
|
||||
COPY ./entrypoint.sh /
|
||||
COPY ./odoo.conf /etc/odoo/
|
||||
|
||||
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
||||
RUN chown odoo /etc/odoo/odoo.conf \
|
||||
&& mkdir -p /mnt/extra-addons \
|
||||
&& chown -R odoo /mnt/extra-addons
|
||||
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
||||
|
||||
# Expose Odoo services
|
||||
EXPOSE 8069 8071 8072
|
||||
|
||||
# Set the default config file
|
||||
ENV ODOO_RC /etc/odoo/odoo.conf
|
||||
|
||||
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
|
||||
|
||||
# Set default user when running the container
|
||||
USER odoo
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["odoo"]
|
@ -1,32 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import psycopg2
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
arg_parser = argparse.ArgumentParser()
|
||||
arg_parser.add_argument('--db_host', required=True)
|
||||
arg_parser.add_argument('--db_port', required=True)
|
||||
arg_parser.add_argument('--db_user', required=True)
|
||||
arg_parser.add_argument('--db_password', required=True)
|
||||
arg_parser.add_argument('--timeout', type=int, default=5)
|
||||
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
start_time = time.time()
|
||||
while (time.time() - start_time) < args.timeout:
|
||||
try:
|
||||
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname='postgres')
|
||||
error = ''
|
||||
break
|
||||
except psycopg2.OperationalError as e:
|
||||
error = e
|
||||
else:
|
||||
conn.close()
|
||||
time.sleep(1)
|
||||
|
||||
if error:
|
||||
print("Database connection failure: %s" % error, file=sys.stderr)
|
||||
sys.exit(1)
|
104
18.0/Dockerfile
104
18.0/Dockerfile
@ -1,104 +0,0 @@
|
||||
FROM ubuntu:noble
|
||||
MAINTAINER Odoo S.A. <info@odoo.com>
|
||||
|
||||
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
|
||||
|
||||
# Generate locale C.UTF-8 for postgres and general locale data
|
||||
ENV LANG en_US.UTF-8
|
||||
|
||||
# Retrieve the target architecture to install the correct wkhtmltopdf package
|
||||
ARG TARGETARCH
|
||||
|
||||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
curl \
|
||||
dirmngr \
|
||||
fonts-noto-cjk \
|
||||
gnupg \
|
||||
libssl-dev \
|
||||
node-less \
|
||||
npm \
|
||||
python3-magic \
|
||||
python3-num2words \
|
||||
python3-odf \
|
||||
python3-pdfminer \
|
||||
python3-pip \
|
||||
python3-phonenumbers \
|
||||
python3-pyldap \
|
||||
python3-qrcode \
|
||||
python3-renderpm \
|
||||
python3-setuptools \
|
||||
python3-slugify \
|
||||
python3-vobject \
|
||||
python3-watchdog \
|
||||
python3-xlrd \
|
||||
python3-xlwt \
|
||||
xz-utils && \
|
||||
if [ -z "${TARGETARCH}" ]; then \
|
||||
TARGETARCH="$(dpkg --print-architecture)"; \
|
||||
fi; \
|
||||
WKHTMLTOPDF_ARCH=${TARGETARCH} && \
|
||||
case ${TARGETARCH} in \
|
||||
"amd64") WKHTMLTOPDF_ARCH=amd64 && WKHTMLTOPDF_SHA=967390a759707337b46d1c02452e2bb6b2dc6d59 ;; \
|
||||
"arm64") WKHTMLTOPDF_SHA=90f6e69896d51ef77339d3f3a20f8582bdf496cc ;; \
|
||||
"ppc64le" | "ppc64el") WKHTMLTOPDF_ARCH=ppc64el && WKHTMLTOPDF_SHA=5312d7d34a25b321282929df82e3574319aed25c ;; \
|
||||
esac \
|
||||
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_${WKHTMLTOPDF_ARCH}.deb \
|
||||
&& echo ${WKHTMLTOPDF_SHA} wkhtmltox.deb | sha1sum -c - \
|
||||
&& apt-get install -y --no-install-recommends ./wkhtmltox.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
|
||||
|
||||
# install latest postgresql-client
|
||||
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ noble-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& GNUPGHOME="$(mktemp -d)" \
|
||||
&& export GNUPGHOME \
|
||||
&& 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 --no-install-recommends -y postgresql-client \
|
||||
&& rm -f /etc/apt/sources.list.d/pgdg.list \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install rtlcss (on Debian buster)
|
||||
RUN npm install -g rtlcss
|
||||
|
||||
# Install Odoo
|
||||
ENV ODOO_VERSION 18.0
|
||||
ARG ODOO_RELEASE=20241220
|
||||
ARG ODOO_SHA=449cd495882dc0f35bc11632414fcdc585ed350e
|
||||
RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
|
||||
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends ./odoo.deb \
|
||||
&& rm -rf /var/lib/apt/lists/* odoo.deb
|
||||
|
||||
# Copy entrypoint script and Odoo configuration file
|
||||
COPY ./entrypoint.sh /
|
||||
COPY ./odoo.conf /etc/odoo/
|
||||
|
||||
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
|
||||
RUN chown odoo /etc/odoo/odoo.conf \
|
||||
&& mkdir -p /mnt/extra-addons \
|
||||
&& chown -R odoo /mnt/extra-addons
|
||||
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
|
||||
|
||||
# Expose Odoo services
|
||||
EXPOSE 8069 8071 8072
|
||||
|
||||
# Set the default config file
|
||||
ENV ODOO_RC /etc/odoo/odoo.conf
|
||||
|
||||
COPY wait-for-psql.py /usr/local/bin/wait-for-psql.py
|
||||
|
||||
# Set default user when running the container
|
||||
USER odoo
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["odoo"]
|
@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import psycopg2
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
arg_parser = argparse.ArgumentParser()
|
||||
arg_parser.add_argument('--db_host', required=True)
|
||||
arg_parser.add_argument('--db_port', required=True)
|
||||
arg_parser.add_argument('--db_name', required=True)
|
||||
arg_parser.add_argument('--db_user', required=True)
|
||||
arg_parser.add_argument('--db_password', required=True)
|
||||
arg_parser.add_argument('--timeout', type=int, default=5)
|
||||
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
start_time = time.time()
|
||||
while (time.time() - start_time) < args.timeout:
|
||||
try:
|
||||
conn = psycopg2.connect(user=args.db_user, host=args.db_host, port=args.db_port, password=args.db_password, dbname=args.db_name)
|
||||
error = ''
|
||||
break
|
||||
except psycopg2.OperationalError as e:
|
||||
error = e
|
||||
else:
|
||||
conn.close()
|
||||
time.sleep(1)
|
||||
|
||||
if error:
|
||||
print("Database connection failure: %s" % error, file=sys.stderr)
|
||||
sys.exit(1)
|
39
tests-10.0/Dockerfile
Normal file
39
tests-10.0/Dockerfile
Normal file
@ -0,0 +1,39 @@
|
||||
FROM debian:stretch
|
||||
ENV LANG C.UTF-8
|
||||
# Needed to download requirements.txt from github
|
||||
ENV ODOOVER 10.0
|
||||
USER root
|
||||
RUN set -x ; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libxslt1-dev \
|
||||
node-less \
|
||||
python \
|
||||
python-dev \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
python-wheel \
|
||||
virtualenv \
|
||||
zlib1g-dev \
|
||||
&& curl -sSL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -o phantomjs.tar.bz2 \
|
||||
&& tar xvfO phantomjs.tar.bz2 phantomjs-2.1.1-linux-x86_64/bin/phantomjs > /usr/local/bin/phantomjs \
|
||||
&& rm phantomjs.tar.bz2 \
|
||||
&& chmod +x /usr/local/bin/phantomjs \
|
||||
&& curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb -o /tmp/wkhtml.deb \
|
||||
&& dpkg --force-depends -i /tmp/wkhtml.deb \
|
||||
&& apt-get install -y -f --no-install-recommends \
|
||||
&& rm /tmp/wkhtml.deb \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& groupadd -g 1000 odoo \
|
||||
&& useradd -u 1000 -g odoo odoo \
|
||||
&& mkdir /home/odoo \
|
||||
&& chown -R odoo:odoo /home/odoo
|
||||
USER odoo
|
||||
ADD --chown=odoo:odoo https://raw.githubusercontent.com/odoo/odoo/${ODOOVER}/requirements.txt /home/odoo/requirements.txt
|
||||
RUN ["/bin/bash", "-c", "virtualenv /home/odoo/odoovenv && source /home/odoo/odoovenv/bin/activate && pip install --no-cache-dir -r /home/odoo/requirements.txt"]
|
38
tests-11.0/Dockerfile
Normal file
38
tests-11.0/Dockerfile
Normal file
@ -0,0 +1,38 @@
|
||||
FROM debian:stretch-slim
|
||||
ENV LANG C.UTF-8
|
||||
# Needed to download requirements.txt from github
|
||||
ENV ODOOVER 11.0
|
||||
USER root
|
||||
RUN set -x ; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libxslt1-dev \
|
||||
node-less \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
virtualenv \
|
||||
&& curl -sSL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -o phantomjs.tar.bz2 \
|
||||
&& tar xvfO phantomjs.tar.bz2 phantomjs-2.1.1-linux-x86_64/bin/phantomjs > /usr/local/bin/phantomjs \
|
||||
&& rm phantomjs.tar.bz2 \
|
||||
&& chmod +x /usr/local/bin/phantomjs \
|
||||
&& curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb -o /tmp/wkhtml.deb \
|
||||
&& dpkg --force-depends -i /tmp/wkhtml.deb \
|
||||
&& apt-get install -y -f --no-install-recommends \
|
||||
&& rm /tmp/wkhtml.deb \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& groupadd -g 1000 odoo \
|
||||
&& useradd -u 1000 -g odoo odoo \
|
||||
&& mkdir /home/odoo \
|
||||
&& chown -R odoo:odoo /home/odoo
|
||||
USER odoo
|
||||
ADD --chown=odoo:odoo https://raw.githubusercontent.com/odoo/odoo/${ODOOVER}/requirements.txt /home/odoo/requirements.txt
|
||||
RUN ["/bin/bash", "-c", "virtualenv -p python3 /home/odoo/odoovenv && source /home/odoo/odoovenv/bin/activate && pip install --no-cache-dir -r /home/odoo/requirements.txt"]
|
38
tests-12.0/Dockerfile
Normal file
38
tests-12.0/Dockerfile
Normal file
@ -0,0 +1,38 @@
|
||||
FROM debian:stretch-slim
|
||||
ENV LANG C.UTF-8
|
||||
# Needed to download requirements.txt from github
|
||||
ENV ODOOVER 12.0
|
||||
USER root
|
||||
RUN set -x ; \
|
||||
apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
libldap2-dev \
|
||||
libsasl2-dev \
|
||||
libxslt1-dev \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
virtualenv \
|
||||
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
|
||||
&& echo "deb https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
|
||||
&& apt-get update && apt-get install -y google-chrome-beta \
|
||||
&& curl -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb -o /tmp/wkhtml.deb \
|
||||
&& dpkg --force-depends -i /tmp/wkhtml.deb \
|
||||
&& apt-get install -y -f --no-install-recommends \
|
||||
&& rm /tmp/wkhtml.deb \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& groupadd -g 1000 odoo \
|
||||
&& useradd -u 1000 -g odoo -G audio,video odoo \
|
||||
&& mkdir /home/odoo \
|
||||
&& chown -R odoo:odoo /home/odoo
|
||||
USER odoo
|
||||
ADD --chown=odoo:odoo https://raw.githubusercontent.com/odoo/odoo/${ODOOVER}/requirements.txt /home/odoo/requirements.txt
|
||||
RUN ["/bin/bash", "-c", "virtualenv -p python3 /home/odoo/odoovenv && source /home/odoo/odoovenv/bin/activate && pip install --no-cache-dir -r /home/odoo/requirements.txt && pip install websocket-client"]
|
Loading…
Reference in New Issue
Block a user