/
Dockerfile
44 lines (32 loc) · 1.32 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM debian:buster
ENV container docker
ENV LC_ALL C
ENV DEBIAN_FRONTEND noninteractive
# Setup our data persistence
VOLUME ["/var/log/", "/tmp/"]
MAINTAINER Robbie Ferguson <nems@category5.tv>
# Setup apt
COPY files/sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y apt-utils
# Install a few prerequisites
RUN apt-get update && \
apt-get install -y ca-certificates wget ssl-cert git unzip make python3 procps
# Setup faux systemctl environment
RUN wget -O /tmp/systemctl.zip https://github.com/gdraheim/docker-systemctl-replacement/archive/v1.4.3000.zip && \
cd /tmp && \
unzip systemctl.zip && \
cd docker-systemctl-replacement* && \
make && \
mv -f ./files/docker/systemctl3.py /usr/bin/ && \
chmod +x /usr/bin/systemctl3.py && \
ln -s /usr/bin/systemctl3.py /bin/systemctl && \
ln -s /usr/bin/systemctl3.py /usr/bin/systemctl
#CMD ["/bin/bash", "-c", "/bin/systemctl"]
RUN /usr/sbin/make-ssl-cert generate-default-snakeoil --force-overwrite
RUN wget --no-check-certificate -O /tmp/nems-prep.sh https://raw.githubusercontent.com/Cat5TV/nems-admin/master/nems-prep.sh && \
chmod +x /tmp/nems-prep.sh && \
/tmp/nems-prep.sh
EXPOSE 22/tcp 80/tcp 443/tcp 2812/tcp 9090/tcp
RUN /root/nems/nems-admin/nems-build.sh 21
ENTRYPOINT ["/usr/bin/systemctl","default","--init"]