Add 'Dockerfile'

This commit is contained in:
Danny Bessems 2020-01-17 13:42:16 +00:00
parent b4fce7ea41
commit f5cd608a90

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM alpine:latest
COPY init/entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/entrypoint.sh && \
apk add --update --no-cache \
cups cups-filters cups-libs && \
sed -i 's/Listen localhost:631/Listen 0.0.0.0:631/' /etc/cups/cupsd.conf && \
sed -i 's/<Location \/>/<Location \/>\n Allow All/' /etc/cups/cupsd.conf && \
sed -i 's/<Location \/admin>/<Location \/admin>\n Allow All\n Require user @SYSTEM/' /etc/cups/cupsd.conf && \
sed -i 's/<Location \/admin\/conf>/<Location \/admin\/conf>\n Allow All/' /etc/cups/cupsd.conf && \
echo "ServerAlias *" >> /etc/cups/cupsd.conf && \
echo "DefaultEncryption Never" >> /etc/cups/cupsd.conf
VOLUME /etc/cups /var/log/cups /var/spool/cups /var/spool/cups-pdf /var/cache/cups
EXPOSE 631
CMD ["/usr/local/bin/entrypoint.sh"]