[FIX] Odoo 11.0-13.0: set the default shell to bash

It appears that dash can be unpredictable.

Also, uses the `pipefail` as stated in the Dockerfile best practice [1].

[1] https://github.com/docker/docker.github.io/blob/master/develop/develop-images/dockerfile_best-practices.md#using-pipes
This commit is contained in:
Andris 2020-02-02 16:03:29 +01:00 committed by Christophe Monniez
parent 9323219289
commit 3e06fdf97d
3 changed files with 17 additions and 22 deletions

View File

@ -1,6 +1,8 @@
FROM debian:stretch-slim FROM debian:stretch-slim
MAINTAINER Odoo S.A. <info@odoo.com> MAINTAINER Odoo S.A. <info@odoo.com>
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data # Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8 ENV LANG C.UTF-8
@ -8,8 +10,7 @@ ENV LANG C.UTF-8
RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf # Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN set -x; \ RUN apt-get update \
apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
curl \ curl \
@ -37,8 +38,7 @@ RUN set -x; \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb && rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client # install latest postgresql-client
RUN set -x; \ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& export GNUPGHOME="$(mktemp -d)" \ && export GNUPGHOME="$(mktemp -d)" \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \ && repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \ && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
@ -53,8 +53,7 @@ RUN set -x; \
ENV ODOO_VERSION 11.0 ENV ODOO_VERSION 11.0
ARG ODOO_RELEASE=20200417 ARG ODOO_RELEASE=20200417
ARG ODOO_SHA=e21c34a263785eea09babd7a0d876ba05c841935 ARG ODOO_SHA=e21c34a263785eea09babd7a0d876ba05c841935
RUN set -x; \ RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
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 - \ && echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
&& apt-get update \ && apt-get update \
&& apt-get -y install --no-install-recommends ./odoo.deb\ && apt-get -y install --no-install-recommends ./odoo.deb\

View File

@ -1,6 +1,8 @@
FROM debian:stretch-slim FROM debian:stretch-slim
MAINTAINER Odoo S.A. <info@odoo.com> MAINTAINER Odoo S.A. <info@odoo.com>
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data # Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8 ENV LANG C.UTF-8
@ -8,8 +10,7 @@ ENV LANG C.UTF-8
RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list RUN echo 'deb http://deb.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/backports.list
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf # Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN set -x; \ RUN apt-get update \
apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
curl \ curl \
@ -37,8 +38,7 @@ RUN set -x; \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb && rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client # install latest postgresql-client
RUN set -x; \ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& export GNUPGHOME="$(mktemp -d)" \ && export GNUPGHOME="$(mktemp -d)" \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \ && repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \ && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
@ -50,8 +50,7 @@ RUN set -x; \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install rtlcss (on Debian stretch) # Install rtlcss (on Debian stretch)
RUN set -x;\ RUN echo "deb http://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/nodesource.list \
echo "deb http://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/nodesource.list \
&& export GNUPGHOME="$(mktemp -d)" \ && export GNUPGHOME="$(mktemp -d)" \
&& repokey='9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280' \ && repokey='9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \ && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
@ -67,8 +66,7 @@ RUN set -x;\
ENV ODOO_VERSION 12.0 ENV ODOO_VERSION 12.0
ARG ODOO_RELEASE=20200417 ARG ODOO_RELEASE=20200417
ARG ODOO_SHA=ca4a7485b0b75850ffe1458a8f3266839400a501 ARG ODOO_SHA=ca4a7485b0b75850ffe1458a8f3266839400a501
RUN set -x; \ RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
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 - \ && echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
&& apt-get update \ && apt-get update \
&& apt-get -y install --no-install-recommends ./odoo.deb \ && apt-get -y install --no-install-recommends ./odoo.deb \

View File

@ -1,12 +1,13 @@
FROM debian:buster-slim FROM debian:buster-slim
MAINTAINER Odoo S.A. <info@odoo.com> MAINTAINER Odoo S.A. <info@odoo.com>
SHELL ["/bin/bash", "-xo", "pipefail", "-c"]
# Generate locale C.UTF-8 for postgres and general locale data # Generate locale C.UTF-8 for postgres and general locale data
ENV LANG C.UTF-8 ENV LANG C.UTF-8
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf # Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
RUN set -x; \ RUN apt-get update \
apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
ca-certificates \ ca-certificates \
curl \ curl \
@ -35,8 +36,7 @@ RUN set -x; \
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb && rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# install latest postgresql-client # install latest postgresql-client
RUN set -x; \ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
&& export GNUPGHOME="$(mktemp -d)" \ && export GNUPGHOME="$(mktemp -d)" \
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \ && repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \ && gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
@ -48,15 +48,13 @@ RUN set -x; \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Install rtlcss (on Debian buster) # Install rtlcss (on Debian buster)
RUN set -x; \ RUN npm install -g rtlcss
npm install -g rtlcss
# Install Odoo # Install Odoo
ENV ODOO_VERSION 13.0 ENV ODOO_VERSION 13.0
ARG ODOO_RELEASE=20200417 ARG ODOO_RELEASE=20200417
ARG ODOO_SHA=db29fbcebf63f9f656e9445f462190ac775ee533 ARG ODOO_SHA=db29fbcebf63f9f656e9445f462190ac775ee533
RUN set -x; \ RUN curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
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 - \ && echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
&& apt-get update \ && apt-get update \
&& apt-get -y install --no-install-recommends ./odoo.deb \ && apt-get -y install --no-install-recommends ./odoo.deb \