-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (21 loc) · 833 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
FROM ubuntu:21.04
# Disable watchtower checking (optional)
LABEL com.centurylinklabs.watchtower.enable="false"
# Expose the cache directory for volume binding
VOLUME ["/var/cache/apt-cacher-ng"]
# Update apt-get cache
RUN apt-get update -y && \
# Install apt-cacher-ng package
apt-get install apt-cacher-ng -y && \
# Clean up
rm -rf /var/lib/apt/lists/*
# Expose the apt-cacher-ng port to be binded
EXPOSE 3142
# Set cache directory permissions
CMD chmod 777 /var/cache/apt-cacher-ng && \
# Append PassThroughPattern config for SSL/TLS proxying (optional)
echo "PassThroughPattern: .*" >> /etc/apt-cacher-ng/acng.conf && \
# Start the service
/etc/init.d/apt-cacher-ng start && \
# Output all logs of apt-cacher-ng
tail -f /var/log/apt-cacher-ng/*