printnatura/Dockerfile

43 lines
883 B
Docker

#FROM debian:bullseye-slim
FROM ubuntu:18.04
ENV TZ Europe/Madrid
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
cups \
curl \
ca-certificates \
sudo
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/
COPY \
main.js \
print-server.js \
config.yml \
entrypoint.sh \
./
COPY sql sql
COPY GoDEXdriver-1.1.6.tar.gz /tmp/
RUN (cd /tmp && tar -xf /tmp/GoDEXdriver-1.1.6.tar.gz) \
&& chmod a+x /tmp/GoDEXdriver-1.1.6/install-driver \
&& (cd /tmp/GoDEXdriver-1.1.6 && ./install-driver)
RUN echo 'root:1234' | chpasswd
ENTRYPOINT ["/printnatura/entrypoint.sh"]
CMD ["node", "main.js"]