mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-30 05:18:11 +01:00
16a78e70ce
This serves to do two things: 1) chown /znc to znc:znc, which is really handy if the znc user inside the docker container has a new uid, because the files are stored on the host filesystem. 2) to drop privs to the znc user, to reduce the attack surface.
42 lines
800 B
Docker
42 lines
800 B
Docker
FROM debian:jessie
|
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
libssl-dev \
|
|
libperl-dev \
|
|
pkg-config \
|
|
curl \
|
|
sudo \
|
|
--no-install-recommends
|
|
|
|
# get the source
|
|
RUN mkdir /znc-tmp
|
|
RUN curl -sSL http://znc.in/releases/znc-latest.tar.gz | tar -v -C /znc-tmp -xz
|
|
RUN mv /znc-tmp/znc* /znc; rm -rf /znc-tmp
|
|
|
|
# install it
|
|
RUN cd /znc; ./configure; make -j8; make install
|
|
RUN rm -rf /znc
|
|
RUN mkdir /znc
|
|
ADD znc-shim /usr/local/bin/znc-shim
|
|
|
|
RUN adduser \
|
|
--system \
|
|
--home=/znc \
|
|
--shell=/bin/sh \
|
|
--no-create-home \
|
|
--group \
|
|
znc
|
|
|
|
WORKDIR /znc
|
|
ENTRYPOINT ["/usr/local/bin/znc-shim"]
|
|
|
|
# make basic config
|
|
# RUN znc --makeconf
|
|
|
|
# add local config
|
|
# ADD conf /.znc
|
|
|
|
# CMD [ "znc", "-f", "-r" ]
|