-
Notifications
You must be signed in to change notification settings - Fork 71
/
Dockerfile
28 lines (19 loc) · 940 Bytes
/
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
FROM ubuntu:jammy-20230816
LABEL maintainer="[email protected]"
ENV APT_CACHER_NG_VERSION=3.7.4 \
APT_CACHER_NG_CACHE_DIR=/var/cache/apt-cacher-ng \
APT_CACHER_NG_LOG_DIR=/var/log/apt-cacher-ng \
APT_CACHER_NG_USER=apt-cacher-ng
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
apt-cacher-ng=${APT_CACHER_NG_VERSION}* ca-certificates wget \
&& sed 's/# ForeGround: 0/ForeGround: 1/' -i /etc/apt-cacher-ng/acng.conf \
&& sed 's/# PassThroughPattern:.*this would allow.*/PassThroughPattern: .* #/' -i /etc/apt-cacher-ng/acng.conf \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod 755 /sbin/entrypoint.sh
EXPOSE 3142/tcp
HEALTHCHECK --interval=10s --timeout=2s --retries=3 \
CMD wget -q -t1 -O /dev/null http://localhost:3142/acng-report.html || exit 1
ENTRYPOINT ["/sbin/entrypoint.sh"]
CMD ["/usr/sbin/apt-cacher-ng"]