From ab0c2bda6b991c27691124a1e24ce601cf5d1f94 Mon Sep 17 00:00:00 2001 From: Jack Nelson Date: Sun, 8 Oct 2023 10:19:40 -0700 Subject: [PATCH 1/2] add copying config --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d858e79..1e19e79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,7 @@ LABEL maintainer="sameer@damagehead.com" 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_CONFIG_DIR=/etc/apt-cacher-ng/user-config \ APT_CACHER_NG_USER=apt-cacher-ng RUN apt-get update \ From 7ad42600bc29198c79f16e13c105079b3ae32154 Mon Sep 17 00:00:00 2001 From: Jack Nelson Date: Sun, 8 Oct 2023 10:22:17 -0700 Subject: [PATCH 2/2] Update entrypoint.sh --- entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 1e9633c..781aa7b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -23,6 +23,11 @@ create_pid_dir create_cache_dir create_log_dir +#if user config directory was mounted / exists copy files to main apt-cacher-ng directory +if [ -d "$APT_CACHER_NG_CONFIG_DIR" ]; then; +cp ${APT_CACHER_NG_CONFIG_DIR}/. /etc/apt-cacher-ng/ +fi + # allow arguments to be passed to apt-cacher-ng if [[ ${1:0:1} = '-' ]]; then EXTRA_ARGS="$@"