Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "copying" config directory to allow unraid users to more easily pass custom config files #64

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ 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_CONFIG_DIR=/etc/apt-cacher-ng/user-config \
APT_CACHER_NG_USER=apt-cacher-ng

RUN apt-get update \
Expand Down
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="$@"
Expand Down