-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (24 loc) · 1.06 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
FROM debian:bullseye-slim
ENV ASM_APT_NG_CACHER_BIND_ADDRESS=0.0.0.0
ENV ASM_APT_NG_CACHER_USERNAME="acng-admin"
RUN export DEBIAN_FRONTEND=noninteractive ; \
apt update \
&& apt upgrade -y \
&& apt install -y --no-install-recommends apt-cacher-ng ca-certificates cron curl gettext-base logrotate rsyslog s6 \
&& apt-get autoremove -y \
&& apt-get clean \
&& sed -i "s#size 10M#size 128M#g" /etc/logrotate.d/apt-cacher-ng \
&& sed -i '/imklog/s/^/#/' /etc/rsyslog.conf \
&& echo 'cache' > /usr/share/doc/apt-cacher-ng/cache.txt \
&& rm /etc/apt-cacher-ng -rf \
&& rm -r /var/lib/apt/lists/* && rm -rf /tmp && mkdir /tmp && chmod 777 /tmp && truncate -s 0 /var/log/*.log
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
CMD curl -sL -o /dev/null http://127.0.0.1:3142/acng-report.html || exit 1
EXPOSE 3142/tcp
ADD apt-cacher-ng /etc/apt-cacher-ng
ADD s6 /etc/s6
ADD opt /opt/acng
ADD entrypoint.sh /entrypoint.sh
RUN ls -la / && ls -la /opt/ && ls -la /opt/acng && chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["s6-svscan","/etc/s6"]