mirror of
https://github.com/nikdoof/cups-avahi-airprint.git
synced 2025-12-13 12:12:24 +00:00
Fix na-letter paper size
This commit is contained in:
36
Dockerfile
36
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.19
|
||||
FROM alpine:3.20
|
||||
|
||||
# Install the packages we need. Avahi will be included
|
||||
RUN echo -e "https://dl-cdn.alpinelinux.org/alpine/edge/testing\nhttps://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories &&\
|
||||
@@ -8,12 +8,7 @@ RUN echo -e "https://dl-cdn.alpinelinux.org/alpine/edge/testing\nhttps://dl-cdn.
|
||||
cups-client \
|
||||
cups-filters \
|
||||
cups-dev \
|
||||
gutenprint \
|
||||
gutenprint-libs \
|
||||
gutenprint-doc \
|
||||
gutenprint-cups \
|
||||
ghostscript \
|
||||
brlaser \
|
||||
hplip \
|
||||
avahi \
|
||||
inotify-tools \
|
||||
@@ -22,9 +17,31 @@ RUN echo -e "https://dl-cdn.alpinelinux.org/alpine/edge/testing\nhttps://dl-cdn.
|
||||
build-base \
|
||||
wget \
|
||||
rsync \
|
||||
py3-pycups \
|
||||
py3-pycups \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
# Build and install brlaser from source
|
||||
RUN apk add --no-cache git cmake && \
|
||||
git clone https://github.com/pdewacht/brlaser.git && \
|
||||
cd brlaser && \
|
||||
cmake . && \
|
||||
make && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf brlaser
|
||||
|
||||
# Build and install gutenprint from source
|
||||
RUN wget -O gutenprint-5.3.5.tar.xz https://sourceforge.net/projects/gimp-print/files/gutenprint-5.3/5.3.5/gutenprint-5.3.5.tar.xz/download && \
|
||||
tar -xJf gutenprint-5.3.5.tar.xz && \
|
||||
cd gutenprint-5.3.5 && \
|
||||
# Patch to rename conflicting PAGESIZE identifiers to GPT_PAGESIZE in all files in src/testpattern
|
||||
find src/testpattern -type f -exec sed -i 's/\bPAGESIZE\b/GPT_PAGESIZE/g' {} + && \
|
||||
./configure && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd .. && \
|
||||
rm -rf gutenprint-5.3.5 gutenprint-5.3.5.tar.xz
|
||||
|
||||
# This will use port 631
|
||||
EXPOSE 631
|
||||
|
||||
@@ -48,4 +65,7 @@ RUN sed -i 's/Listen localhost:631/Listen 0.0.0.0:631/' /etc/cups/cupsd.conf &&
|
||||
sed -i 's/<Location \/admin\/conf>/<Location \/admin\/conf>\n Allow All/' /etc/cups/cupsd.conf && \
|
||||
sed -i 's/.*enable\-dbus=.*/enable\-dbus\=no/' /etc/avahi/avahi-daemon.conf && \
|
||||
echo "ServerAlias *" >> /etc/cups/cupsd.conf && \
|
||||
echo "DefaultEncryption Never" >> /etc/cups/cupsd.conf
|
||||
echo "DefaultEncryption Never" >> /etc/cups/cupsd.conf && \
|
||||
echo "ReadyPaperSizes A4,TA4,4X6FULL,T4X6FULL,2L,T2L,A6,A5,B5,L,TL,INDEX5,8x10,T8x10,4X7,T4X7,Postcard,TPostcard,ENV10,EnvDL,ENVC6,Letter,Legal" >> /etc/cups/cupsd.conf && \
|
||||
echo "DefaultPaperSize Letter" >> /etc/cups/cupsd.conf && \
|
||||
echo "pdftops-renderer ghostscript" >> /etc/cups/cupsd.conf
|
||||
|
||||
Reference in New Issue
Block a user