41 lines
834 B
Docker
41 lines
834 B
Docker
FROM debian:bullseye-slim
|
|
|
|
ENV TZ Europe/Madrid
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
cups \
|
|
curl \
|
|
ca-certificates \
|
|
sudo \
|
|
libcupsimage2
|
|
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash - \
|
|
&& apt install -y nodejs \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /printnatura
|
|
|
|
COPY \
|
|
package.json \
|
|
package-lock.json \
|
|
./
|
|
RUN npm install
|
|
|
|
COPY cupsd.conf /etc/cups/
|
|
RUN useradd admin && usermod -g lpadmin admin
|
|
|
|
COPY \
|
|
main.js \
|
|
print-server.js \
|
|
config.yml \
|
|
entrypoint.sh \
|
|
./
|
|
COPY sql sql
|
|
|
|
COPY ctzcls-cups_1.1.0-0_amd64.deb /tmp/
|
|
RUN chmod a+x /tmp/ctzcls-cups_1.1.0-0_amd64.deb \
|
|
&& dpkg -i /tmp/ctzcls-cups_1.1.0-0_amd64.deb
|
|
|
|
ENTRYPOINT ["/printnatura/entrypoint.sh"]
|
|
CMD ["node", "main.js"] |