Update README.md

This commit is contained in:
kongkrit 2020-01-03 02:01:06 +07:00 committed by GitHub
parent bf3ceb01d8
commit 345d06c675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 2 deletions

View File

@ -7,7 +7,7 @@ Using Docker to construct your APT(Advanced Packaging Tools) mirror HTTP server.
``` ```
docker run -d \ docker run -d \
-v /path/data:/var/www/html/ubuntu \ -v /path/data:/var/www/html/ \
-p 8080:80 kongkrit/apt-mirror-http-server -p 8080:80 kongkrit/apt-mirror-http-server
``` ```
@ -17,7 +17,22 @@ docker run -d \
### More options with docker command ### 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 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 ## Changelog