From 753d846bb0483cc80cd2ab83f147b622f212a59b Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Mon, 4 May 2026 18:30:10 +0200 Subject: [PATCH 01/12] Include INSTALL_PYCUPS in docs --- docs/02-setup/02-build-setup.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/02-setup/02-build-setup.md b/docs/02-setup/02-build-setup.md index 326de9bf..02239e2f 100644 --- a/docs/02-setup/02-build-setup.md +++ b/docs/02-setup/02-build-setup.md @@ -96,6 +96,7 @@ See [Automated Builds and Deployment](../03-production/06-automated-builds-and-d | PYTHON_VERSION | Python version for the base image | | NODE_VERSION | Node.js version | | WKHTMLTOPDF_VERSION | wkhtmltopdf version | +| INSTALL_PYCUPS | Set true to install pycups and its dependencies; see | | **bench only** | | | DEBIAN_BASE | Debian base version for the bench image, defaults to `bookworm` | | WKHTMLTOPDF_DISTRO | use the specified distro for debian package. Default is `bookworm` | From b3d46de656931d0512f76b24c101a6bf1a1d3d1a Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Mon, 4 May 2026 18:32:59 +0200 Subject: [PATCH 02/12] Add INSTALL_PYCUPS arg and install packages if value is true --- images/custom/Containerfile | 3 +++ images/production/Containerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/images/custom/Containerfile b/images/custom/Containerfile index 2ecb06d7..4564de6c 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -11,6 +11,7 @@ ARG WKHTMLTOPDF_DISTRO=bookworm ARG NODE_VERSION=24.13.0 ENV NVM_DIR=/home/frappe/.nvm ENV PATH=${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH} +ARG INSTALL_PYCUPS=false RUN useradd -ms /bin/bash frappe \ && apt-get update \ @@ -62,6 +63,8 @@ RUN useradd -ms /bin/bash frappe \ && curl -sLO https://github.com/wkhtmltopdf/packaging/releases/download/$WKHTMLTOPDF_VERSION/$downloaded_file \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ + # Install cups + && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ # Clean up && rm -rf /var/lib/apt/lists/* \ && rm -fr /etc/nginx/sites-enabled/default \ diff --git a/images/production/Containerfile b/images/production/Containerfile index f95a9703..7ee7531f 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -7,6 +7,7 @@ ARG WKHTMLTOPDF_DISTRO=bookworm ARG NODE_VERSION=24.13.0 ENV NVM_DIR=/home/frappe/.nvm ENV PATH=${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH} +ARG INSTALL_PYCUPS=false RUN useradd -ms /bin/bash frappe \ && apt-get update \ @@ -58,6 +59,8 @@ RUN useradd -ms /bin/bash frappe \ && curl -sLO https://github.com/wkhtmltopdf/packaging/releases/download/$WKHTMLTOPDF_VERSION/$downloaded_file \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ + # Install cups + && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ # Clean up && rm -rf /var/lib/apt/lists/* \ && rm -fr /etc/nginx/sites-enabled/default \ From c18ef2b69a62a3b7c1df22987a99d3691d6fce96 Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 13:19:00 +0200 Subject: [PATCH 03/12] Pycups env and install --- images/bench/Dockerfile | 5 +++++ images/custom/Containerfile | 3 +++ images/production/Containerfile | 3 +++ 3 files changed, 11 insertions(+) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index 2b2540b5..3d445d48 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -5,6 +5,7 @@ LABEL author=frappé ARG GIT_REPO=https://github.com/frappe/bench.git ARG GIT_BRANCH=v5.x ARG INSTALL_CHROMIUM=true +ARG INSTALL_PYCUPS=false RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ @@ -79,6 +80,8 @@ RUN apt-get update \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ chromium-headless-shell; \ fi \ + # Install cups + && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ && rm -rf /var/lib/apt/lists/* RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ @@ -151,6 +154,8 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | && echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \ && echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc +# Install pycups +RUN if [ "${INSTALL_PYCUPS}" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ EXPOSE 8000-8005 9000-9005 6787 diff --git a/images/custom/Containerfile b/images/custom/Containerfile index da2e050a..e9afb5d9 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -122,6 +122,9 @@ RUN apt-get update \ libbz2-dev \ && rm -rf /var/lib/apt/lists/* +# Install pycups +RUN if [ "${INSTALL_PYCUPS}" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ + USER frappe ARG FRAPPE_BRANCH=version-16 diff --git a/images/production/Containerfile b/images/production/Containerfile index 739f460d..db295bba 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -114,6 +114,9 @@ RUN apt-get update \ libbz2-dev \ && rm -rf /var/lib/apt/lists/* +# Install pycups +RUN if [ "${INSTALL_PYCUPS}" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ + USER frappe FROM build AS builder From 196728c9be1d4cf780acfc944cfbed6d17b9ad92 Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 13:30:13 +0200 Subject: [PATCH 04/12] Pycups env and install --- images/bench/Dockerfile | 4 ++-- images/custom/Containerfile | 4 ++-- images/production/Containerfile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index 3d445d48..5af8aed9 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -81,7 +81,7 @@ RUN apt-get update \ chromium-headless-shell; \ fi \ # Install cups - && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ && rm -rf /var/lib/apt/lists/* RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ @@ -155,7 +155,7 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | && echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc # Install pycups -RUN if [ "${INSTALL_PYCUPS}" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ EXPOSE 8000-8005 9000-9005 6787 diff --git a/images/custom/Containerfile b/images/custom/Containerfile index e9afb5d9..cfa26996 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -64,7 +64,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ @@ -123,7 +123,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "${INSTALL_PYCUPS}" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /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 db295bba..b679e3e4 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -60,7 +60,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ @@ -115,7 +115,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "${INSTALL_PYCUPS}" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ USER frappe From 311b2b9fc6646ca7bf48e657af0d65626720c27b Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 13:34:54 +0200 Subject: [PATCH 05/12] Pycups env and install --- images/bench/Dockerfile | 2 +- images/custom/Containerfile | 2 +- images/production/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index 5af8aed9..8a159394 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -81,7 +81,7 @@ RUN apt-get update \ chromium-headless-shell; \ fi \ # Install cups - && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ && rm -rf /var/lib/apt/lists/* RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ diff --git a/images/custom/Containerfile b/images/custom/Containerfile index cfa26996..6b08760c 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -64,7 +64,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ diff --git a/images/production/Containerfile b/images/production/Containerfile index b679e3e4..bbcdf61e 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -60,7 +60,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ From e15ac47fb01c7527dcf17858875632449fc32a78 Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 13:38:37 +0200 Subject: [PATCH 06/12] Pycups env and install --- images/bench/Dockerfile | 2 +- images/custom/Containerfile | 2 +- images/production/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index 8a159394..eec017eb 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -155,7 +155,7 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | && echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi \ EXPOSE 8000-8005 9000-9005 6787 diff --git a/images/custom/Containerfile b/images/custom/Containerfile index 6b08760c..176388a2 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -123,7 +123,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /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 bbcdf61e..afebfef6 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -115,7 +115,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi \ USER frappe From 94aa96c624b251ecc39b9bfb8db94af707c1e90b Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 13:41:41 +0200 Subject: [PATCH 07/12] Pycups env and install --- images/bench/Dockerfile | 2 +- images/custom/Containerfile | 2 +- images/production/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index eec017eb..452d5e50 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -155,7 +155,7 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | && echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi EXPOSE 8000-8005 9000-9005 6787 diff --git a/images/custom/Containerfile b/images/custom/Containerfile index 176388a2..5e9aa1ff 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -123,7 +123,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /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 afebfef6..9f7b39e6 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -115,7 +115,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi \ +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi USER frappe From d77993f400ff8e976d2b0d3dabdf3cd61888d36e Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 13:44:32 +0200 Subject: [PATCH 08/12] Pycups env and install --- images/bench/Dockerfile | 2 +- images/custom/Containerfile | 2 +- images/production/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index 452d5e50..e2cd4a78 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -155,7 +155,7 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | && echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi EXPOSE 8000-8005 9000-9005 6787 diff --git a/images/custom/Containerfile b/images/custom/Containerfile index 5e9aa1ff..f167e033 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -123,7 +123,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi +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 9f7b39e6..860e131b 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -115,7 +115,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install pycups -RUN if [ "$INSTALL_PYCUPS" != "false" ]; then RUN /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi USER frappe From d628689eae05765bde5f250f4e4594e49a7c4487 Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 13:19:00 +0200 Subject: [PATCH 09/12] Pycups env and install Pycups env and install --- images/bench/Dockerfile | 5 +++++ images/custom/Containerfile | 5 ++++- images/production/Containerfile | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index 2b2540b5..e2cd4a78 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -5,6 +5,7 @@ LABEL author=frappé ARG GIT_REPO=https://github.com/frappe/bench.git ARG GIT_BRANCH=v5.x ARG INSTALL_CHROMIUM=true +ARG INSTALL_PYCUPS=false RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ @@ -79,6 +80,8 @@ RUN apt-get update \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ chromium-headless-shell; \ fi \ + # Install cups + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ && rm -rf /var/lib/apt/lists/* RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ @@ -151,6 +154,8 @@ RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | && echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \ && echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> ~/.bashrc +# Install pycups +RUN if [ "$INSTALL_PYCUPS" != "false" ]; then /home/frappe/frappe-bench/env/bin/pip install --no-cache-dir pycups; fi EXPOSE 8000-8005 9000-9005 6787 diff --git a/images/custom/Containerfile b/images/custom/Containerfile index da2e050a..f167e033 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -64,7 +64,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ @@ -122,6 +122,9 @@ 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 ARG FRAPPE_BRANCH=version-16 diff --git a/images/production/Containerfile b/images/production/Containerfile index 739f460d..860e131b 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -60,7 +60,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "${INSTALL_PYCUPS}" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ @@ -114,6 +114,9 @@ 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 FROM build AS builder From 8f5d2f12e9dd4678e412181f5f6096e920321c62 Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 14:37:46 +0200 Subject: [PATCH 10/12] Pycups env and install --- images/bench/Dockerfile | 2 +- images/custom/Containerfile | 2 +- images/production/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/bench/Dockerfile b/images/bench/Dockerfile index e2cd4a78..523caf59 100644 --- a/images/bench/Dockerfile +++ b/images/bench/Dockerfile @@ -81,7 +81,7 @@ RUN apt-get update \ chromium-headless-shell; \ fi \ # Install cups - && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install -y libcups2-dev; fi \ && rm -rf /var/lib/apt/lists/* RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ diff --git a/images/custom/Containerfile b/images/custom/Containerfile index f167e033..663a669d 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -64,7 +64,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install -y libcups2-dev; fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ diff --git a/images/production/Containerfile b/images/production/Containerfile index 860e131b..d51f7847 100644 --- a/images/production/Containerfile +++ b/images/production/Containerfile @@ -60,7 +60,7 @@ RUN useradd -ms /bin/bash frappe \ && apt-get install -y ./$downloaded_file \ && rm $downloaded_file \ # Install cups - && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install --no-install-recommends -y libcups2-dev cups-client; fi \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then apt-get install -y libcups2-dev; fi \ # Chromium && if [ "$INSTALL_CHROMIUM" != "false" ]; then \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ 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 11/12] 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 From 3db494948f3596c7ad820d65820ea50dcd2e724f Mon Sep 17 00:00:00 2001 From: martkaczmarek <31852710+martkaczmarek@users.noreply.github.com> Date: Fri, 22 May 2026 14:58:14 +0200 Subject: [PATCH 12/12] . --- images/custom/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/custom/Containerfile b/images/custom/Containerfile index fabe02c3..d98c29c4 100644 --- a/images/custom/Containerfile +++ b/images/custom/Containerfile @@ -76,7 +76,7 @@ RUN useradd -ms /bin/bash frappe \ && 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 \ + && if [ "$INSTALL_PYCUPS" != "false" ]; then 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 \