12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- FROM debian:buster
-
- RUN apt-get update && \
- DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -yq \
- locales \
- sudo \
- whois \
- cups \
- printer-driver-all \
- foomatic-db-compressed-ppds \
- openprinting-ppds \
- gutenprint-locales \
- && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/*
-
- RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen en_US.UTF-8
- ENV LANG en_US.UTF-8
- ENV LANGUAGE en_US:en
- ENV LC_ALL en_US.UTF-8
-
- ARG ADMIN_USER=print
- ARG ADMIN_PWD=print
-
- RUN useradd \
- --groups=sudo,lp,lpadmin \
- --create-home \
- --home-dir=/home/${ADMIN_USER} \
- --shell=/bin/bash \
- --password=$(mkpasswd ${ADMIN_PWD}) \
- ${ADMIN_USER} \
- && sed -i '/%sudo[[:space:]]/ s/ALL[[:space:]]*$/NOPASSWD:ALL/' /etc/sudoers
-
- COPY ./drivers /tmp/drivers
-
- COPY ./bin /usr/local/bin
-
- RUN install_drivers -d /tmp/drivers && \
- rm -rf /tmp/drivers
-
- EXPOSE 631
-
- ENTRYPOINT ["/usr/sbin/cupsd", "-f"]
|