<|start_filename|>images/arch-stubby/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880050' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_STUBBY='0.2.3-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "stubby=${VERSION_STUBBY}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    setcap \
        'cap_net_bind_service=eip' /usr/bin/tini \
        'cap_net_bind_service=ei' /usr/bin/stubby

USER contusr
EXPOSE 53/tcp 53/udp
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/stubby"]


<|start_filename|>images/arch-python-script/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-python:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880048' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm python-requests python-simplejson && \
    find /var/cache/pacman/pkg -mindepth 1 -delete

USER contusr
ENTRYPOINT ["/usr/bin/false"]


<|start_filename|>images/arch-mono/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

ENV VERSION_MONO='5.16.0.220-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "mono=${VERSION_MONO}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete


<|start_filename|>images/arch-hostapd/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880027' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_HOSTAPD='2.7-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "hostapd=${VERSION_HOSTAPD}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    setcap 'cap_net_admin,cap_net_raw=ep' /usr/bin/hostapd

USER contusr
ENTRYPOINT ["/usr/bin/hostapd", "/etc/hostapd/hostapd.conf"]


<|start_filename|>images/arch-cadvisor/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

ENV VERSION_CADVISOR='0.31.0-1' GODEBUG='netdns=go'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nfnty/cadvisor=${VERSION_CADVISOR}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete

USER root
EXPOSE 8080/tcp
ENTRYPOINT ["/usr/bin/cadvisor"]


<|start_filename|>images/arch-devel/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm --needed base-devel git && \
    find /var/cache/pacman/pkg -mindepth 1 -delete


<|start_filename|>images/arch-python/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

ENV VERSION_PYTHON='3.7.1-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "python=${VERSION_PYTHON}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete


<|start_filename|>images/arch-owncloud/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-nginx-php:latest
MAINTAINER nfnty <<EMAIL>>

USER root

ENV VERSION_OWNCLOUD='9.1.3-2'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "owncloud=${VERSION_OWNCLOUD}" php-apcu php-pgsql && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    rm /usr/share/webapps/owncloud/config && \
    install --directory --owner=contusr --group=contgrp --mode=700 /usr/share/webapps/owncloud/{config,data} && \
    chown --recursive contusr:contgrp /usr/share/webapps/owncloud/apps

USER contusr
VOLUME ["/usr/share/webapps/owncloud/apps", "/usr/share/webapps/owncloud/config", "/usr/share/webapps/owncloud/data"]


<|start_filename|>images/arch-exim/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880025' && \
    groupadd --gid "${ugid}" exim && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false --home-dir /var/spool/exim exim

ENV VERSION_EXIM='4.91-2'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "exim=${VERSION_EXIM}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    chmod -s /usr/bin/exim && \
    setcap \
        'cap_net_bind_service=eip' /usr/bin/tini \
        'cap_net_bind_service=ei' /usr/bin/exim && \
    install --directory --owner=exim --group=exim --mode=700 /var/log/exim /var/spool/exim

USER exim
VOLUME ["/var/spool/exim"]
EXPOSE 25/tcp 587/tcp
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/bin/exim", "-bdf", "-q30m"]


<|start_filename|>images/arch-bitcoin-classic/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880033' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_BITCOIN_CLASSIC='1.1.1-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nfnty/bitcoin-classic=${VERSION_BITCOIN_CLASSIC}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    install --directory --owner=contusr --group=contgrp --mode=700 /var/lib/bitcoin

USER contusr
VOLUME ["/var/lib/bitcoin"]
EXPOSE 8333/tcp
ENTRYPOINT ["/usr/bin/bitcoind", "-conf=/etc/bitcoin/bitcoin.conf", "-datadir=/var/lib/bitcoin", "-printtoconsole"]


<|start_filename|>images/arch-acoustid/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-python2:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880037' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV PATH="/opt/acoustid-server/e/bin:${PATH}" \
    PYTHONPATH="/opt/acoustid-server" \
    ACOUSTID_CONFIG="/opt/acoustid-server/acoustid.conf"
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm python nfnty/acoustid-server-git && \
    find /var/cache/pacman/pkg -mindepth 1 -delete

USER contusr
EXPOSE 5000/tcp
WORKDIR /opt/acoustid-server
ENTRYPOINT [ \
    "/opt/multiprocess.py", "--", \
    "/opt/acoustid-server/e/bin/python -m acoustid.web.app --host :: --api", \
    "/opt/acoustid-server/e/bin/python /opt/acoustid-server/scripts/import_submissions.py --config /opt/acoustid-server/acoustid.conf", \
    "/opt/acoustid-server/e/bin/python /opt/acoustid-server/scripts/warm_up_cache.py --config /opt/acoustid-server/acoustid.conf" \
]


<|start_filename|>images/arch-openhab-telldus/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-openhab:latest
MAINTAINER nfnty <<EMAIL>>

USER root
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm nfnty/telldus-core-git python && \
    find /var/cache/pacman/pkg -mindepth 1 -delete

USER contusr
VOLUME ["/var/lib/telldus"]
ENTRYPOINT ["/opt/multiprocess.py", "--", "/usr/bin/telldusd --nodaemon", "/opt/openhab/start.sh"]


<|start_filename|>images/arch-rsyslog/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880034' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_RSYSLOG='8.40.0-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nfnty/rsyslog=${VERSION_RSYSLOG}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    install --directory --owner=contusr --group=contgrp --mode=700 /var/log/rsyslog /run

USER contusr
VOLUME ["/var/log/rsyslog"]
ENTRYPOINT ["/usr/bin/rsyslogd", "-n", "-i", "/run/rsyslog.pid"]


<|start_filename|>images/arch-python2/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

ENV VERSION_PYTHON2='2.7.15-2'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "python2=${VERSION_PYTHON2}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete


<|start_filename|>images/arch-pimd/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880030' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_PIMD='2.3.2-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nfnty/pimd=${VERSION_PIMD}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    setcap 'cap_net_admin,cap_net_raw=ep' /usr/bin/pimd && \
    rm /var/run && \
    install --directory --owner=contusr --group=contgrp --mode=700 /var/run

USER contusr
ENTRYPOINT ["/usr/bin/pimd", "--foreground", "--disable-vifs"]


<|start_filename|>images/arch-nginx-php/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-nginx:latest
MAINTAINER nfnty <<EMAIL>>

USER root

ENV VERSION_PHP='7.3.0-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "php=${VERSION_PHP}" "php-fpm=${VERSION_PHP}" python && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    install --directory --owner=contusr --group=contgrp --mode=700 /run/php-fpm

USER contusr
ENTRYPOINT [ \
    "/opt/multiprocess.py", "--", \
    "/usr/bin/php-fpm --fpm-config /etc/php/php-fpm.conf", \
    "/usr/bin/nginx -g 'daemon off;'" \
]


<|start_filename|>images/arch-powerdns-recursor/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880024' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_POWERDNS_RECURSOR='4.1.8-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "powerdns-recursor=${VERSION_POWERDNS_RECURSOR}" lua-luajson && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    setcap 'cap_net_bind_service=ep' /usr/bin/pdns_recursor

USER contusr
EXPOSE 53/tcp 53/udp
ENTRYPOINT ["/usr/bin/pdns_recursor"]


<|start_filename|>images/arch-postgresql-acoustid/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-postgresql:latest
MAINTAINER nfnty <<EMAIL>>

USER root

RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm nfnty/pg_acoustid-git && \
    find /var/cache/pacman/pkg -mindepth 1 -delete

USER postgres


<|start_filename|>images/arch-dante/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880046' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_DANTE='1.4.2-2'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "dante=${VERSION_DANTE}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete

USER contusr
EXPOSE 1080/tcp 1080/udp
ENTRYPOINT ["/usr/bin/sockd"]


<|start_filename|>images/arch-udp-broadcast-relay/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880049' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

COPY ["udp-broadcast-relay", "/opt/"]
RUN chmod 'u=rwX,g=rX,o=rX' /opt/udp-broadcast-relay && \
    setcap \
        'cap_net_bind_service,cap_net_raw=eip' /usr/bin/tini \
        'cap_net_bind_service,cap_net_raw=ei' /opt/udp-broadcast-relay

USER contusr
ENTRYPOINT ["/usr/bin/tini", "--", "/opt/udp-broadcast-relay"]


<|start_filename|>images/arch-parity/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880043' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false --home-dir /var/lib/parity/home contusr

ENV VERSION_PARITY='2.1.10-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "parity=${VERSION_PARITY}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    install --directory --owner=contusr --group=contgrp --mode=700 /var/lib/parity/home

USER contusr
VOLUME ["/var/lib/parity"]
EXPOSE  8080/tcp 8180/tcp 8545/tcp 30303/tcp 30303/udp
ENTRYPOINT [ \
    "/usr/bin/parity", \
    "--db-path", "/var/lib/parity/db", \
    "--keys-path", "/var/lib/parity/keys", \
    "--ui-path", "/var/lib/parity/signer", \
    "--ipc-path", "/var/lib/parity/ipc" \
]


<|start_filename|>images/arch-kea/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880026' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_KEA='1.4.0.P1-4' KEA_PIDFILE_DIR='/run/kea' KEA_LOGGER_DESTINATION='stderr'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "kea=${VERSION_KEA}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    setcap \
        'cap_net_bind_service,cap_net_raw=ep' /usr/bin/kea-dhcp4 \
        'cap_net_bind_service,cap_net_raw=ep' /usr/bin/kea-dhcp6 && \
    install --directory --owner=contusr --group=contgrp --mode=700 \
        /var/kea /var/log/kea /run/kea

USER contusr
VOLUME ["/var/kea"]
ENTRYPOINT ["/usr/bin/kea-dhcp4", "-c", "/etc/kea/kea.conf"]


<|start_filename|>images/arch-grafana/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880021' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_GRAFANA='5.4.2-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nfnty/grafana=${VERSION_GRAFANA}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    chown --recursive contusr:contgrp /var/lib/grafana

USER contusr
VOLUME ["/var/lib/grafana"]
EXPOSE 3000/tcp
ENTRYPOINT [ \
    "/usr/bin/grafana-server", \
    "--homepath=/usr/share/grafana", \
    "--config=/etc/grafana/grafana.ini", \
    "cfg:default.log.mode=console" \
]


<|start_filename|>images/arch-dnsdist/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880045' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_DNSDIST='1.3.3-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "dnsdist=${VERSION_DNSDIST}" lua-luajson && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    setcap 'cap_net_bind_service=ep' /usr/bin/dnsdist

USER contusr
EXPOSE 53/tcp 53/udp
ENTRYPOINT ["/usr/bin/dnsdist", "--supervised", "--config", "/etc/dnsdist/config.lua"]


<|start_filename|>images/arch-influxdb/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880035' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_INFLUXDB='1.2.2-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nfnty/influxdb=${VERSION_INFLUXDB}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    chown --recursive contusr:contgrp /var/lib/influxdb

USER contusr
VOLUME ["/var/lib/influxdb"]
EXPOSE 8083/tcp 8086/tcp 8088/tcp 8091/tcp
ENTRYPOINT ["/usr/bin/influxd", "--config", "/etc/influxdb/config.toml"]


<|start_filename|>images/arch-acoustid-index/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880039' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm nfnty/acoustid-index-git && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    install --directory --owner=contusr --group=contgrp --mode=700 /var/lib/acoustid-index

USER contusr
VOLUME ["/var/lib/acoustid-index"]
EXPOSE 6080/tcp
ENTRYPOINT ["/usr/bin/fpi-server", "--directory", "/var/lib/acoustid-index", "--address", "::"]


<|start_filename|>Makefile<|end_filename|>
TEST_PATHS = *

test_pylint:
	@echo
	@echo "Running pylint..."
	@for test_path in $(TEST_PATHS); do \
		echo "Testing $${test_path}"; \
		find "$${test_path}" $(TEST_PATHS_IGNORE) -type f -name '*.py' -exec pylint '{}' '+' || exit "$${?}"; \
	done
	@echo "pylint passed!"

test_flake8:
	@echo
	@echo "Running flake8..."
	@for test_path in $(TEST_PATHS); do \
		echo "Testing $${test_path}"; \
		find "$${test_path}" $(TEST_PATHS_IGNORE) -type f -name '*.py' -exec flake8 '{}' '+' || exit "$${?}"; \
	done
	@echo "flake8 passed!"

test_mypy:
	@echo
	@echo "Running mypy..."
	@for test_path in $(TEST_PATHS); do \
		echo "Testing $${test_path}"; \
		find "$${test_path}" $(TEST_PATHS_IGNORE) -type f -name '*.py' -exec mypy '{}' '+' || exit "$${?}"; \
	done
	@echo "mypy passed!"

test: test_pylint test_flake8 test_mypy
	@echo "Finished testing: All tests passed!"

.PHONY: test test_pylint test_flake8 test_mypy


<|start_filename|>images/arch-heka/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880029' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_HEKA='0.10.0-6'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nfnty/heka=${VERSION_HEKA}" geoip-database-extra && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    chown --recursive contusr:contgrp /var/cache/hekad

USER contusr
VOLUME ["/var/cache/hekad"]
EXPOSE 4352/tcp
ENTRYPOINT ["/usr/bin/hekad", "-config=/etc/heka/conf.d/"]


<|start_filename|>images/arch-unifi/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-jre8:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880004' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_UNIFI='5.9.29' JAVA_HOME='/usr/lib/jvm/default-runtime'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm mongodb && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    \
    mkdir /opt/unifi && \
    set -o pipefail && \
    curl --speed-limit 256000 --location \
        "https://dl.ubnt.com/unifi/${VERSION_UNIFI}/UniFi.unix.zip" | \
        bsdtar --extract --file=- --strip-components=1 --no-same-owner --directory='/opt/unifi' && \
    rm --recursive /opt/unifi/lib/native && \
    curl 'http://central.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.2.6/snappy-java-1.1.2.6.jar' --output /opt/unifi/lib/snappy-java-*
COPY ["mongod", "/opt/unifi/bin/"]
RUN chmod --recursive 'u=rwX,g=rX,o=rX' /opt/unifi && \
    install --directory --owner=contusr --group=contgrp --mode=700 /opt/unifi/{data,logs,run,work}

USER contusr
VOLUME ["/opt/unifi/data", "/opt/unifi/logs", "/opt/unifi/work"]
EXPOSE 8080/tcp 8443/tcp
WORKDIR /opt/unifi
ENTRYPOINT ["/usr/bin/java", "-jar", "/opt/unifi/lib/ace.jar", "start"]


<|start_filename|>images/arch-transmission/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880010' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_TRANSMISSION='2.94-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "transmission-cli=${VERSION_TRANSMISSION}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    install --directory --owner=contusr --group=contgrp --mode=700 \
        /var/lib/transmission /var/log/transmission

USER contusr
VOLUME ["/var/lib/transmission"]
EXPOSE 9091/tcp 51413/tcp 51413/udp
ENTRYPOINT ["/usr/bin/transmission-daemon", "--foreground", "--config-dir", "/var/lib/transmission"]


<|start_filename|>images/arch-bootstrap/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

COPY ["etc/pacman.conf", "/etc/"]
COPY ["scripts/", "/opt/bootstrap/"]
RUN chmod 'u=rw,g=r,o=r' /etc/pacman.conf && \
    pacman --sync --clean --clean --noconfirm && \
    \
    chmod --recursive 'u=rX,g=,o=' /opt/bootstrap && \
    \
    pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm arch-install-scripts && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    perl -p -i -e 's|^(chroot_setup )|#\1|' /usr/bin/pacstrap && \
    \
    install --directory --owner=root --group=root --mode=700 /var/lib/bootstrap/{,archive}

USER root
VOLUME ["/var/lib/bootstrap"]
ENTRYPOINT ["/opt/bootstrap/build.sh"]


<|start_filename|>images/arch-openhab/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-jre8:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880017' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_OPENHAB='1.8.3' JAVA_HOME='/usr/lib/jvm/default-runtime'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm ttf-dejavu && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    \
    mkdir /opt/openhab && \
    set -o pipefail && \
    curl --speed-limit 256000 --location \
        "https://bintray.com/artifact/download/openhab/bin/distribution-${VERSION_OPENHAB}-runtime.zip" | \
        bsdtar --extract --file=- --directory='/opt/openhab' && \
    chmod --recursive 'u=rwX,g=rX,o=rX' /opt/openhab && \
    chmod --recursive 755 /opt/openhab/{start.sh,start_debug.sh} && \
    chown --recursive contusr:contgrp /opt/openhab/webapps/static && \
    \
    perl -p -i \
        -e 's|^(java \\)|exec \1|;' \
        -e 's|(-console)|-configuration /var/lib/openhab/work \\\n\t\1|;' \
        -e 's|(-console)|-data /var/lib/openhab/work \\\n\t\1|;' \
        -e 's|(-Djetty\.port=)|-Dsmarthome.userdata=/var/lib/openhab \\\n\t\1|;' \
        /opt/openhab/{start.sh,start_debug.sh} && \
    perl -0777 -p -i -e 's|( *)(<Ref id="RequestLog">.*</Ref>)|\1<!--\n\1\2\n\1-->|s' /opt/openhab/etc/jetty.xml && \
    install --directory --owner=contusr --group=contgrp --mode=700 \
        /var/lib/openhab{,/work} /var/log/openhab

USER contusr
VOLUME ["/var/lib/openhab"]
EXPOSE 8080/tcp 8443/tcp
ENTRYPOINT ["/opt/openhab/start.sh"]


<|start_filename|>images/arch-nodejs/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

ENV VERSION_NODEJS='11.5.0-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "nodejs=${VERSION_NODEJS}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete


<|start_filename|>images/arch-builder/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-devel:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880001' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false --home-dir /tmp/home contusr

RUN install --directory --owner=contusr --group=contgrp --mode=700 \
        /tmp/{build,home,pkgbuild} /var/lib/builder/{,gnupg,pkg,src} /var/log/builder
ENV GNUPGHOME='/var/lib/builder/gnupg'
COPY ["etc/", "/etc/"]
COPY ["gnupg/", "${GNUPGHOME}/"]
COPY ["scripts/", "/opt/builder/"]
RUN chmod 'u=rw,g=r,o=r' /etc/makepkg.conf && \
    chmod 'u=r,g=r,o=' /etc/sudoers && \
    chown --recursive contusr:contgrp "${GNUPGHOME}" && \
    chmod --recursive 'u=rwX,g=,o=' "${GNUPGHOME}" && \
    chmod --recursive 'u=rwX,g=rX,o=rX' /opt/builder && \
    \
    pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm python-requests && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    \
    perl -0777 -p -i -e 's|#(\[multilib\]\n)#(Include = /etc/pacman.d/mirrorlist)|\1\2|s' /etc/pacman.conf

USER contusr
VOLUME ["/var/lib/builder", "/var/log/builder"]
ENTRYPOINT ["/opt/builder/builder.py"]


<|start_filename|>images/arch-clamav/latest/Dockerfile<|end_filename|>
FROM nfnty/arch-mini:latest
MAINTAINER nfnty <<EMAIL>>

RUN ugid='880040' && \
    groupadd --gid "${ugid}" contgrp && \
    useradd --uid "${ugid}" --gid "${ugid}" --shell /usr/bin/false contusr

ENV VERSION_CLAMAV='0.101.0-1'
RUN pacman --sync --noconfirm --refresh --sysupgrade && \
    pacman --sync --noconfirm "clamav=${VERSION_CLAMAV}" && \
    find /var/cache/pacman/pkg -mindepth 1 -delete && \
    install --directory --owner=contusr --group=contgrp --mode=700 /var/lib/clamav

USER contusr
VOLUME ["/var/lib/clamav"]
EXPOSE 3310/tcp
ENTRYPOINT ["/usr/bin/clamd"]
