forked from sameersbn/docker-apt-cacher-ng
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
30 lines (23 loc) · 913 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
29
30
FROM debian:jessie
MAINTAINER Chenliang Wang<[email protected]>
ENV 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 -y apt-cacher-ng iputils-ping cron \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod 755 /sbin/entrypoint.sh
COPY ubuntu_mirrors /etc/apt-cacher-ng/ubuntu_mirrors
RUN chmod 644 /etc/apt-cacher-ng/ubuntu_mirrors
COPY centos_mirrors /etc/apt-cacher-ng/centos_mirrors
RUN chmod 644 /etc/apt-cacher-ng/centos_mirrors
# Run any additional tasks here that are too tedious to put in
# this dockerfile directly.
ADD setup.sh /setup.sh
RUN chmod 0755 /setup.sh
RUN /setup.sh
EXPOSE 3142/tcp
VOLUME ["${APT_CACHER_NG_CACHE_DIR}"]
ENTRYPOINT ["/sbin/entrypoint.sh"]
CMD ["/usr/sbin/apt-cacher-ng"]