First commit
This commit is contained in:
parent
049d96aa36
commit
150380bc6d
35
Dockerfile
35
Dockerfile
@ -1,16 +1,16 @@
|
||||
# base image
|
||||
# Base Image
|
||||
ARG ARCH=amd64
|
||||
FROM $ARCH/debian:bullseye-slim
|
||||
|
||||
# args
|
||||
# Args
|
||||
ARG VCS_REF
|
||||
ARG BUILD_DATE
|
||||
|
||||
# environment
|
||||
# Environment
|
||||
ENV ADMIN_PASSWORD=admin
|
||||
ENV ADMIN_USERNAME=admin
|
||||
|
||||
# labels
|
||||
# Labels
|
||||
LABEL maintainer="Sthope <hopelessautomations@gmail.com>" \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
org.label-schema.name="sthopeless/cups" \
|
||||
@ -21,7 +21,15 @@ LABEL maintainer="Sthope <hopelessautomations@gmail.com>" \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.build-date=$BUILD_DATE
|
||||
|
||||
# install packages
|
||||
# Install Canon Drivers
|
||||
# RUN apt-get update && \
|
||||
# apt-get install -y wget && \
|
||||
# wget https://gdlp01.c-wss.com/gds/9/0100010919/01/cnijfilter2-6.10-1-deb.tar.gz -O canon.tar.gz && \
|
||||
# tar -xvf canon.tar.gz && \
|
||||
# cd cnijfilter2-6.10-1-deb/ && \
|
||||
# ./install.sh
|
||||
|
||||
# Install Packages
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
sudo \
|
||||
@ -34,37 +42,38 @@ RUN apt-get update \
|
||||
hpijs-ppds \
|
||||
hp-ppd \
|
||||
hplip \
|
||||
wget \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# add print user
|
||||
# Add Print Username
|
||||
RUN adduser --home /home/admin --shell /bin/bash --gecos "admin" --disabled-password admin \
|
||||
&& adduser admin sudo \
|
||||
&& adduser admin lp \
|
||||
&& adduser admin lpadmin
|
||||
|
||||
# disable sudo password checking
|
||||
# Disable Sudo Password Checking
|
||||
RUN echo 'admin ALL=(ALL:ALL) ALL' >> /etc/sudoers
|
||||
|
||||
# enable access to CUPS
|
||||
# Enable Access to CUPS
|
||||
RUN /usr/sbin/cupsd \
|
||||
&& while [ ! -f /var/run/cups/cupsd.pid ]; do sleep 1; done \
|
||||
&& cupsctl --remote-admin --remote-any --share-printers \
|
||||
&& kill $(cat /var/run/cups/cupsd.pid) \
|
||||
&& echo "ServerAlias *" >> /etc/cups/cupsd.conf
|
||||
|
||||
# copy /etc/cups for skeleton usage
|
||||
# Copy /etc/cups for skeleton usage
|
||||
RUN cp -rp /etc/cups /etc/cups-skel
|
||||
|
||||
# entrypoint
|
||||
# Entrypoint
|
||||
ADD docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
ENTRYPOINT [ "docker-entrypoint.sh" ]
|
||||
|
||||
# default command
|
||||
# Default Command
|
||||
CMD ["cupsd", "-f"]
|
||||
|
||||
# volumes
|
||||
# Volumes
|
||||
VOLUME ["/etc/cups"]
|
||||
|
||||
# ports
|
||||
# Ports
|
||||
EXPOSE 631
|
@ -6,4 +6,8 @@ if [ ! -f /etc/cups/cupsd.conf ]; then
|
||||
cp -rpn /etc/cups-skel/* /etc/cups/
|
||||
fi
|
||||
|
||||
wget https://gdlp01.c-wss.com/gds/9/0100010919/01/cnijfilter2-6.10-1-deb.tar.gz -O canon.tar.gz && \
|
||||
tar -xvf canon.tar.gz && \
|
||||
cd cnijfilter2-6.10-1-deb/ && ./install.sh
|
||||
|
||||
exec "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user