FROM alpine
MAINTAINER Pierre-Olivier Mercier <nemunaire@nemunai.re>

RUN apk add --no-cache alpine-baselayout bash busybox nsd openssh openssl openrc python2

VOLUME /etc/nsd

EXPOSE 53
EXPOSE 53/udp

RUN rc-update add nsd default && rc-update add sshd default && rc-update add networking default
COPY init /etc/init.d/nsd
COPY sshd_config /etc/ssh/sshd_config

CMD ["/sbin/openrc-init"]

LABEL org.mobyproject.config='{"binds": ["/etc/resolv.conf:/etc/resolv.conf"], "capabilities": ["CAP_NET_BIND_SERVICE"]}'
