added NTHREADS, PUID, PGID support

This commit is contained in:
dude 2020-01-04 10:45:14 +07:00
parent 80b0924af7
commit 0a35617192
3 changed files with 5 additions and 1 deletions

View File

@ -8,6 +8,7 @@ RUN \
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV TIMEOUT 12h ENV TIMEOUT 12h
ENV MIRROR_URL http://archive.ubuntu.com/ubuntu ENV MIRROR_URL http://archive.ubuntu.com/ubuntu
ENV NTHREADS 10
ENV PUID 1000 ENV PUID 1000
ENV PGID 1000 ENV PGID 1000

View File

@ -17,6 +17,7 @@ docker run -d \
* `-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 TIMEOUT=timeout-value`: to set the resync period, default is 12 hours. See 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. See the [TIMEOUT format description](http://www.cyberciti.biz/faq/linux-unix-sleep-bash-scripting/)
* `-e NTHREADS=10`: number of wget threads to use to pull from MIRROR_URL - default to 10
* `-e PUID=userid`: set to a userid that can access the mounted volume (see note below) * `-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) * `-e PGID=groupid`: set to a groupid that can access the mounted volume (see note below)
@ -34,6 +35,8 @@ In this instance `PUID=1000` and `PGID=1000`. To find yours use id user as below
You only need to set the PUID and PGID variables if you are mounting the `/var/www/html` folder You only need to set the PUID and PGID variables if you are mounting the `/var/www/html` folder
## Changelog ## Changelog
* 2020-01-04
* support PUID, PGID, and NTHREADS
* 2020-01-01 * 2020-01-01
* updated ubuntu to 18.04 LTS * updated ubuntu to 18.04 LTS

View File

@ -3,7 +3,7 @@
echo "configuring /etc/apt/mirror.list" echo "configuring /etc/apt/mirror.list"
echo "#### config #### echo "#### config ####
set base_path /var/www/html/ubuntu set base_path /var/www/html/ubuntu
set nthreads 20 set nthreads $NTHREADS
set _tilde 0 set _tilde 0
deb $MIRROR_URL bionic main restricted universe multiverse deb $MIRROR_URL bionic main restricted universe multiverse