Skip to content

Commit c97dbfb

Browse files
authored
Merge pull request #16 from linuxserver/readme
update readme with optional parameters
2 parents 0655c66 + 3fd2135 commit c97dbfb

File tree

2 files changed

+61
-13
lines changed

2 files changed

+61
-13
lines changed

README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,17 @@ Here are some example snippets to help you get started creating a container.
5757
```
5858
docker create \
5959
--name=duckdns \
60+
-e PUID=1001 `#optional` \
61+
-e PGID=1001 `#optional` \
6062
-e TZ=Europe/London \
6163
-e SUBDOMAINS=subdomain1,subdomain2 \
6264
-e TOKEN=token \
65+
-e LOG_FILE=false `#optional` \
66+
-v </path/to/appdata/config>:/config `#optional` \
6367
--restart unless-stopped \
6468
linuxserver/duckdns
6569
```
6670

67-
### optional parameters
68-
`-e LOG_FILE=true` if you prefer the duckdns log to be written to a file instead of the docker log
69-
`-v <path to data>:/config` used in conjunction with logging to file
7071

7172
### docker-compose
7273

@@ -80,9 +81,14 @@ services:
8081
image: linuxserver/duckdns
8182
container_name: duckdns
8283
environment:
84+
- PUID=1001 #optional
85+
- PGID=1001 #optional
8386
- TZ=Europe/London
8487
- SUBDOMAINS=subdomain1,subdomain2
8588
- TOKEN=token
89+
- LOG_FILE=false #optional
90+
volumes:
91+
- </path/to/appdata/config>:/config #optional
8692
mem_limit: 4096m
8793
restart: unless-stopped
8894
```
@@ -93,10 +99,28 @@ Container images are configured using parameters passed at runtime (such as thos
9399

94100
| Parameter | Function |
95101
| :----: | --- |
102+
| `-e PUID=1001` | for UserID - see below for explanation |
103+
| `-e PGID=1001` | for GroupID - see below for explanation |
96104
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
97105
| `-e SUBDOMAINS=subdomain1,subdomain2` | multiple subdomains allowed, comma separated, no spaces |
98106
| `-e TOKEN=token` | DuckDNS token |
107+
| `-e LOG_FILE=false` | Set to `true` to log to file (also need to map /config). |
108+
| `-v /config` | Used in conjunction with logging to file. |
99109

110+
## User / Group Identifiers
111+
112+
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`.
113+
114+
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
115+
116+
In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as below:
117+
118+
```
119+
$ id username
120+
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
121+
```
122+
123+
You only need to set the PUID and PGID variables if you are mounting the /config folder
100124

101125
&nbsp;
102126
## Application Setup
@@ -137,6 +161,7 @@ Below are the instructions for updating containers:
137161

138162
## Versions
139163

164+
* **08.02.19:** - Update readme with optional parameters.
140165
* **10.12.18:** - Fix docker compose example.
141166
* **15.10.18:** - Multi-arch image.
142167
* **22.08.18:** - Rebase to alpine 3.8.

readme-vars.yml

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,47 @@ available_architectures:
1313
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
1414
- { arch: "{{ arch_armhf }}", tag: "arm32v6-latest"}
1515

16+
# development version
17+
development_versions: false
18+
development_versions_items: ""
19+
1620
# container parameters
17-
common_param_env_vars_enabled: false
21+
common_param_env_vars_enabled: 'optional' #PGID, PUID, etc, you can set it to 'optional'
1822
param_container_name: "{{ project_name }}"
19-
param_usage_include_vols: false
20-
param_volumes: ""
21-
param_usage_include_ports: false
22-
param_ports: ""
23+
param_usage_include_net: false #you can set it to 'optional'
24+
param_net: ""
25+
param_net_desc: ""
2326
param_usage_include_env: true
2427
param_env_vars:
2528
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
2629
- { env_var: "SUBDOMAINS", env_value: "subdomain1,subdomain2", desc: "multiple subdomains allowed, comma separated, no spaces"}
2730
- { env_var: "TOKEN", env_value: "token", desc: "DuckDNS token"}
31+
param_usage_include_vols: false
32+
param_volumes: ""
33+
param_usage_include_ports: false
34+
param_ports: ""
35+
param_device_map: false
36+
param_devices: ""
37+
cap_add_param: false
38+
cap_add_param_vars: ""
39+
40+
# optional container parameters
41+
opt_param_usage_include_env: true
42+
opt_param_env_vars:
43+
- { env_var: "LOG_FILE", env_value: "false", desc: "Set to `true` to log to file (also need to map /config)."}
44+
opt_param_usage_include_vols: true
45+
opt_param_volumes:
46+
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Used in conjunction with logging to file." }
47+
opt_param_usage_include_ports: false
48+
opt_param_ports: ""
49+
opt_param_device_map: false
50+
opt_param_devices: ""
51+
opt_cap_add_param: false
52+
opt_cap_add_param_vars: ""
2853

2954
# optional parameters
30-
optional_block_1: true
31-
optional_block_1_items:
32-
- "### optional parameters"
33-
- "`-e LOG_FILE=true` if you prefer the duckdns log to be written to a file instead of the docker log "
34-
- "`-v <path to data>:/config` used in conjunction with logging to file"
55+
optional_block_1: false
56+
optional_block_1_items: ""
3557

3658
# application setup block
3759
app_setup_block_enabled: true
@@ -42,6 +64,7 @@ app_setup_block: |
4264
4365
# changelog
4466
changelogs:
67+
- { date: "08.02.19:", desc: "Update readme with optional parameters." }
4568
- { date: "10.12.18:", desc: "Fix docker compose example." }
4669
- { date: "15.10.18:", desc: "Multi-arch image." }
4770
- { date: "22.08.18:", desc: "Rebase to alpine 3.8." }

0 commit comments

Comments
 (0)