Dockerfile 616 B

12345678910111213141516171819202122232425
  1. FROM ubuntu
  2. WORKDIR /
  3. RUN apt-get update -y && apt-get upgrade -y && apt-get install -y git python3 python3-pip avahi-daemon cups cups-pdf samba ufw
  4. RUN ufw allow 631/tcp && ufw allow 5353/udp
  5. RUN sed -i 's/Listen localhost:631/#Listen localhost:631/g' /etc/cups/cupsd.conf
  6. RUN \
  7. cat >> /etc/cups/cupsd.conf <<'EOF'
  8. Port 631
  9. Browsing On
  10. BrowseLocalProtocols dnssd
  11. EOF
  12. RUN lpadmin -p cups-pdf -v cups-pdf:/ -E -P /usr/share/ppd/cups-pdf/CUPS-PDF.ppd
  13. RUN git clone https://github.com/foreverpositive/New-Phystech-Printers-Bot.git cloned
  14. WORKDIR /cloned/
  15. RUN pip install -r requirements.txt
  16. CMD python3 main.py