You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
728 B
33 lines
728 B
FROM alpine:latest as build
|
|
|
|
RUN apk add --no-cache --update openssl
|
|
|
|
# Generate self signed SSL cert in case user forgets
|
|
RUN openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
|
-keyout /znc.key -out /znc.crt -subj "/CN=localhost" \
|
|
-addext "subjectAltName=DNS:localhost,IP:127.0.0.1" > /dev/null 2>&1 3>&1
|
|
|
|
RUN cat znc.key znc.crt > /znc.pem
|
|
|
|
FROM znc:1.8.2-slim
|
|
|
|
LABEL maintainer "jerryaldrichiii@gmail.com"
|
|
|
|
COPY --from=build /znc.pem /srv/znc/tls/
|
|
|
|
RUN mkdir -p /srv/znc/ && \
|
|
chmod g+s /srv/znc/ && \
|
|
chown znc:znc -R /srv/znc/
|
|
|
|
# See entrypoint.sh
|
|
VOLUME /srv/znc/
|
|
|
|
EXPOSE 6667
|
|
EXPOSE 8000
|
|
|
|
COPY ./entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
USER znc
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|