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