From 345d06c675f9f40a41cea8efb5bcf1c943876f1f Mon Sep 17 00:00:00 2001 From: kongkrit <45794368+kongkrit@users.noreply.github.com> Date: Fri, 3 Jan 2020 02:01:06 +0700 Subject: [PATCH] Update README.md --- README.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 024c602..dc043e4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Using Docker to construct your APT(Advanced Packaging Tools) mirror HTTP server. ``` docker run -d \ - -v /path/data:/var/www/html/ubuntu \ + -v /path/data:/var/www/html/ \ -p 8080:80 kongkrit/apt-mirror-http-server ``` @@ -17,7 +17,22 @@ docker run -d \ ### More options with docker command * `-e MIRROR_URL=url`: to replace default URL (http://archive.ubuntu.com/ubuntu) - See [Ubuntu Mirrors](https://launchpad.net/ubuntu/+archivemirrors) -* `-e RESYNC_PERIOD=timeout-value`: to set the resync period, default is 12 hours. To set the [TIMEOUT format description](http://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/) +* `-e TIMEOUT=timeout-value`: to set the resync period, default is 12 hours. To set the [TIMEOUT format description](http://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/) +* `-e PUID=userid`: set to a userid that can access the mounted volume (see note below) +* `-e PGID=groupid`: set to a groupid that can access the mounted volume (see note below) + +### More on PUID and PGID from [linuxserver.io](https://hub.docker.com/r/linuxserver/duckdns) + +When using volumes (-v flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. + +Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. + +In this instance `PUID=1000` and `PGID=1000`, to find yours use id user as below: + + > $ id username + > uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) + +You only need to set the PUID and PGID variables if you are mounting the `/var/www/html` folder ## Changelog