[odoo-web] Allow specifying UIDs/GIDs higher than what the image ships with. Also pass -l to avoid docker from
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odoo-web] Allow specifying UIDs/GIDs higher than what the image ships with. Also pass -l to avoid docker from
- Date: Thu, 14 Feb 2019 10:37:21 +0000 (UTC)
commit b5dcba35b6227e6dfc00f55eef3f09bb94f5edfd
Author: Andrea Veri <averi redhat com>
Date: Thu Feb 14 11:37:02 2019 +0100
Allow specifying UIDs/GIDs higher than what the image ships with. Also pass -l to avoid docker from
crashing (https://github.com/moby/moby/issues/5419)
Dockerfile | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index 6a978d8..43873e9 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,6 +14,14 @@ RUN pip3 install plaid-python
WORKDIR /tmp
+RUN sed -i 's/UID_MAX/#UID_MAX/' /etc/login.defs && \
+ sed -i 's/GID_MAX/#GID_MAX/' /etc/login.defs && \
+ echo 'UID_MAX 1000250000' >> /etc/login.defs && \
+ echo 'GID_MAX 1000250000' >> /etc/login.defs
+
+RUN groupadd -g 1000230000 odoogroup && \
+ useradd -l -u 1000230000 -g odoogroup -s /bin/false odoouser
+
ADD plaid_ept.zip /tmp
RUN unzip plaid_ept.zip -d /opt/odoo/custom-addons
@@ -28,12 +36,9 @@ RUN mv currency/currency_rate_update /opt/odoo/custom-addons
RUN chown 1000230000:1000230000 -R /opt/odoo/custom-addons
-RUN groupadd -g 1000230000 odoo
-RUN useradd -u 1000230000 -g 1000230000 -d /var/lib/odoo -r -s /usr/sbin/nologin odoo
-
RUN rm -rf /tmp/{bank-statement-import,currency,plaid_ept,paypal_transaction_sync}
RUN apt-get purge git unzip python3-wheel python3-pip -y && apt-get autoremove -y
RUN apt-get clean
WORKDIR /var/lib/odoo
-USER 1000230000
+USER odoouser
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]