Pycups env and install

Pycups env and install
This commit is contained in:
martkaczmarek 2026-05-22 13:19:00 +02:00
parent 99db74d389
commit d628689eae
3 changed files with 13 additions and 2 deletions

View file

@ -5,6 +5,7 @@ LABEL author=frappé
ARG GIT_REPO=https://github.com/frappe/bench.git ARG GIT_REPO=https://github.com/frappe/bench.git
ARG GIT_BRANCH=v5.x ARG GIT_BRANCH=v5.x
ARG INSTALL_CHROMIUM=true ARG INSTALL_CHROMIUM=true
ARG INSTALL_PYCUPS=false
RUN apt-get update \ RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ && 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 \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
chromium-headless-shell; \ chromium-headless-shell; \
fi \ 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/* && 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 \ 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/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 && 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 EXPOSE 8000-8005 9000-9005 6787

View file

@ -64,7 +64,7 @@ RUN useradd -ms /bin/bash frappe \
&& apt-get install -y ./$downloaded_file \ && apt-get install -y ./$downloaded_file \
&& rm $downloaded_file \ && rm $downloaded_file \
# Install cups # 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 # Chromium
&& if [ "$INSTALL_CHROMIUM" != "false" ]; then \ && if [ "$INSTALL_CHROMIUM" != "false" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
@ -122,6 +122,9 @@ RUN apt-get update \
libbz2-dev \ libbz2-dev \
&& rm -rf /var/lib/apt/lists/* && 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 USER frappe
ARG FRAPPE_BRANCH=version-16 ARG FRAPPE_BRANCH=version-16

View file

@ -60,7 +60,7 @@ RUN useradd -ms /bin/bash frappe \
&& apt-get install -y ./$downloaded_file \ && apt-get install -y ./$downloaded_file \
&& rm $downloaded_file \ && rm $downloaded_file \
# Install cups # 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 # Chromium
&& if [ "$INSTALL_CHROMIUM" != "false" ]; then \ && if [ "$INSTALL_CHROMIUM" != "false" ]; then \
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
@ -114,6 +114,9 @@ RUN apt-get update \
libbz2-dev \ libbz2-dev \
&& rm -rf /var/lib/apt/lists/* && 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 USER frappe
FROM build AS builder FROM build AS builder