From 9b2f7e24d445aa2b0b0e861931286d3299f00824 Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 14:46:44 +0200 Subject: [PATCH] Pycups env and install --- images/bench/Dockerfile | 4 ++++ images/custom/Containerfile | 5 +++-- images/production/Containerfile | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index 523caf59..500e6b24 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -124,6 +124,10 @@ RUN git clone --depth 1 https://github.com/pyenv/pyenv.git .pyenv \ && echo 'eval "$(pyenv init --path)"' >>~/.profile \ && echo 'eval "$(pyenv init -)"' >>~/.bashrc + + # Install pycups +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then pip install --no-cache-dir pycups; fi \ + # Clone and install bench in the local user home directory # For development, bench source is located in ~/.bench ENV PATH=/home/frappe/.local/bin:$PATH diff --git a/images/custom/Containerfile b/images/custom/Containerfile index 663a669d..fabe02c3 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -75,6 +75,8 @@ RUN useradd -ms /bin/bash frappe \ && rm -fr /etc/nginx/sites-enabled/default \ && mkdir -p /etc/nginx/snippets \ && pip3 install frappe-bench \ + # Install pycups + && if [ "$INSTALL_PYCUPS" != "false" ]; then /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi \ # Fixes for non-root nginx and logs to stdout && sed -i '/user www-data/d' /etc/nginx/nginx.conf \ && ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log \ @@ -122,8 +124,7 @@ RUN apt-get update \ libbz2-dev \ && rm -rf /var/lib/apt/lists/* -# Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi + USER frappe diff --git a/images/production/Containerfile b/images/production/Containerfile index d51f7847..ff7bcb5e 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -71,6 +71,8 @@ RUN useradd -ms /bin/bash frappe \ && rm -fr /etc/nginx/sites-enabled/default \ && mkdir -p /etc/nginx/snippets \ && pip3 install frappe-bench \ + # Install pycups + && if [ "$INSTALL_PYCUPS" != "false" ]; then /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi \ # Fixes for non-root nginx and logs to stdout && sed -i '/user www-data/d' /etc/nginx/nginx.conf \ && ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log \ @@ -114,8 +116,7 @@ RUN apt-get update \ libbz2-dev \ && rm -rf /var/lib/apt/lists/* -# Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi + USER frappe